The group $\mathbb{Z}^4$ is not the fundamental group of any 3-manifold, proved by Stallings in this 1962 paper. It follows that there is no algorithm for recognizing 3-manifold groups.