Security of key bits under indistinguishability for randomized encryption
If you could guess the key, you could decrypt the challenge ciphertexts and figure out which plaintext is which.

Conversely, if the cryptosystem has ciphertext indistinguishability in this attack model, then you obviously can't figure out which plaintext is which, so you can't guess the key.