my professor said that $\text{Aut}(\mathbb{Z}^2) \cong GL_2(\mathbb{Z})$. But I don't quite understand why.
An automorphism of $\text{Aut}(\mathbb{Z}^2)$ can be represented as a matrix multiplication: $\phi \left(\begin{matrix}x\\y\end{matrix}\right) = M \cdot \begin{pmatrix}x\\y\end{pmatrix} = \begin{pmatrix}ax+cy\\bx+dy\end{pmatrix}$.
But then why is $\text{Aut}(\mathbb{Z}^2) \cong GL_2(\mathbb{Z})$? Considering $M = \begin{pmatrix} 2 & 0\\ 0 & 2 \end{pmatrix}$, there is no element $x$ in $\mathbb{Z}^2$ such that $Mx = \begin{pmatrix}1\\0\end{pmatrix}$, which means multiplication by $M$ is not bijective.
I have thought of an argument that shows $\text{Aut}(\mathbb{Z}^2) \cong SL_2(\mathbb{Z})$, but I'm not sure whether that's correct either.
Where is my error?
In general, ${\rm Aut}(\Bbb Z^n)\cong GL_n(\Bbb Z)$, what your professor said. This is proved here:
Want to prove $Aut(A_{n})\simeq GL(n, \mathbb{Z})$ where $A_{n}$ is a free abelian group of rank $n$
The general linear group over a commutative ring $R$ with $1$ is given by the $n\times n$-matrices $A\in M_n(R)$, which are invertible over $R$, so that $A^{-1}\in M_n(R)$. This is equivalent to the fact that $\det(A)$ is a unit in $R$. Hence $$ GL_n(\Bbb Z)=\{A\in M_n(\Bbb Z)\mid \det(A)=\pm 1\}. $$
Your matrix $M=2I$ is definitely not in $GL_n(\Bbb Z)$.