The question leaves it unspecified what properties the degree of incorrectness of k' must have, beyond being calculable in NP time.
If $k$ is known (as stated), the archetypal such function is probably the Hamming distance between $k$ and $k'$, that is
$$d(k')=\operatorname{popcount}(k\oplus k')$$
where $\operatorname{popcount}$ counts the number of bits set.
Obviously, $d(k)=0$; there are no other $k'$ with $d(k')=0$; exactly $n$ values of $k'$ with $f(k')=1$ where $n$ is the bitsize of $k$; and more generally ${n\choose j}$ values of $k'$ with $f(k')=j$. With oracle access to $d$, it is trivial to find $k$, and a deep learning algorithm will have no trouble with that.
One function that seems to fit the name and does fit the calculable requirement even when $k$ is unknown (a common hypothesis in cryptography) is:
$$f(k')=\operatorname{popcount}(c\oplus\operatorname{AES}(p, k') )=\operatorname{popcount}(c\oplus c')$$
or, in other words, the Hamming distance between the actual ciphertext, and the ciphertext obtained for key $k'$.
Obviously, $f(k)=0$. Modeling AES-128 as a key-dependent PRP, we expect that beyond $k$, there are very few values of $k'$ with $f(k')=0$ (like zero, one or two values ); around $128$ values of $k'$ with $f(k')=1$; and more generally around ${128\choose j}$ values of $k'$ with $f(k')=j$. So that $f$ behaves quite similarly to $d$ from this standpoint, for AES-128.
There is some bad news, though: consensus is that a deep learning algorithm given oracle access to $f$, or even the full explicit definition of $f$ including the AES step, won't be able find $k$, or even find $k'$ with low value of $f(k')$, faster than trying $k'$ at random. If it did, that would be a break of AES. The security of AES relies on the conjecture that, even considering the definition of AES, the task is impossible.