$\newcommand{\Z}{\mathbb{Z}}$
The statement $\pi_2(X)=0$ would imply that $X$ is a $K(\pi,1)$, is not true. I will construct for you now an acyclic space,(the space $X$ below) with $\pi_2=0$, that is not an eilenberg maclane space.
Let $2I$ be the $\Z/2$ extension of the icosahedral group, $I$, given by the preimage of $I$ under $spin(3) \to SO(3)$(FYI spin(3) is the connected double cover of $SO(3)$). Since $I$ is perfect,i.e. $H_1(I)=0$, the hoschild-serre spectral sequence of this extension implies that $H_1(2I)$ is perfect. Therefore by the Quillen plus construction there is a space with $X$ with $\tilde H_*(X)=0$, and $\pi_1(X)=2I$. Since $2I$ is not an acyclic group, $K(2I,1) \neq X$ in the homotopy category. But if $X$ were an eilenberg maclane space it would have to be $K(2I,1)$. Therefore $X$ is not an eilenberg maclane space. Furthermore, since $\pi_2(\text{quillen plus construction on } A_5)=\Z/2$, $\pi_2(X)=0$.