I claim: For $n\ge2$, the reduction mod $p$ morphism $K(\mathbb{Z},n)\rightarrow K(\mathbb{F}_p,n)$ induces a non-zero map on mod $p$ cohomology in infinitely many degrees. (Proof: Rely on the algebra description in Tamanoi's paper.)
Then, this map obviously cannot factor through a $K(G,n)$ with only homology (and hence mod $p$ cohomology) in finitely many degrees (this is generalizing Will Sawin's idea), so $G$ has no $p$-torsion. Thus, $G$ is divisible, but we already know Prüfer groups have homology in infinitely many degrees and an infinite product of $\mathbb{Q}$s does too by Künneth, …