My book says that
We represent $n$ as $n=2k+1$ where $k$ is from natural numbers or $k=0$
Then $n^2=(2k+1)^2=4k^2+4k+1$. We write $n^2=2(2k^2+2k)+1$ where $2k^2+2k$ is natural number or $0$ and we write it with $k_1$.
Now we can say that $n^2=2k_1+1$ where $k_1$ is a natural number or $0$. This proves what we wanted to know.
Now I don't get the last part of proof when we replaced the $2k^2+2k$. Can anyone help me?
The proof presented by your book actually proves the converse of the statement in the title:
As hinted in the comments, a quick way to prove the original statement in your title is to prove its contrapositive instead.