[This answer was sparked by a question $4$ years later about the above question].
Almost surely the intended context is the ring of integers, so $\,n\in \Bbb Z,\,$ which excludes $\,n = \sqrt 2$.
But it is instructive to examine what occurs in the more general number ring that you consider.
In fact it remains true if we adjoin $\,\sqrt 2\,$ to $\,\Bbb Z\,$ to obtain $\,\Bbb Z[\sqrt 2] = \{ j + k \sqrt 2\ :\ j,k\in\Bbb Z\}$
As I explain here this ring has a sense of parity: $\,\alpha = j+k\sqrt 2\,$ is even $\iff \sqrt 2\mid \alpha \iff 2\mid j$
which immediately yields $\ \alpha^2\,$ even $\iff \alpha$ even. As explained in the linked post, integer parity results immediately generalize to any ring which has $\,\Bbb Z/2 = $ integers $\!\bmod 2\,$ as an image.
As above, many results from elementary number theory generalize to algebraic numbers. These topics are covered in any course on algebraic number theory.