By letting $k = 2$, you tested $n^2 = (2 \times k + 1) = 5^2 = 25$, so for $k = 2$, we have $n = 5$ is odd. It is the odd $n$, and its associated square in which we are interested.
Filling in the details of your argument:
(We use the following:
- For every integer $n$, either $n$ is even or $n$ is odd but not both.
- $n$ is an even positive integer means that $2$ divides $n$ (i.e., $n$ even means there exists an integer $k$ such that $n = 2k$, or equivalently, that n is a multiple of 2.)
- $n$ is an odd integer if and only if there exists an integer $k$ such that $n = 2k + 1$ ($n$ is odd if and only if $2$ does NOT divide $n$).)
to prove the following:
$(1)$ If the square of an integer $n$ is an even, then $n$ is even.
$\quad\quad$ by proving the contrapositive of $(1)$ which is:
$(2)$ For $n\in \mathbb{Z}$, if $n$ is not an even integer, then $n^2$ is not even.
$\quad\quad$Using the first bullet above, $(2)$ is equivalent to $(3)$:
$(3)$ If $n$ is an odd integer, then $n^2$ is an odd integer.
Assume $n$ is odd:
Then for all odd $n$, there is an integer $k$ such that,
$n=2 \cdot k + 1 $ (it doesn't matter if $k$ is odd or even. We need only know that $n$ is odd.)
Then, $n^2=(2k + 1)^2 = 4k^2 + 4k + 1 = 4(k^2 + k) + 1$
Since $2$ divides $4$, but does not divide $1$, $n^2$ must be odd.
Or, as you have written: $2$ divides $2k(2k + 2)$ but does not divide $1$,
Hence, for integer $n$, $n$ is not an even integer $\implies$ $n^2$ not even...
So having proven its contrapositive, we conclude that if $n^2$ is even, then $n$ must be even.