Eilenberg-Mac Lane spaces for groups that can’t see $p$-groups

All groups here are abelian and $p$ is a prime number; I'll say $P$ is a $p$-group if every element of $P$ has finite order which is a power of $p$.

Suppose $\mathrm{Hom}(G,P) = 0$ for every $p$-group $P$. Does it follow that $\mathrm{map}_*(K(G,n), K(P,m))\sim *$ for all $p$-groups $P$ and all $m,n\geq 1$?

Certainly it is true if $G$ is a finitely generated group or an arbitrary torsion group (all elements of finite order); and it is true for any $G$ in the special case $m = n$. But I worry about the possibility of some oddball group with elements of infinite order such that $[ K(G,n), K(P,n+k)] \neq *$ for some $k > 0$ and some $p$-group $P$.

-

Yes. Your hypothesis on $G$ means that $G$ is torsion and prime to $p$: every element of $G$ has finite order prime to $p$. This in turn implies that the integral homology group $H_mK(G,n)$ is torsion and prime to $p$, for every $m,n>0$. That in turn implies the conclusion ($H^m(K(G,n);P)=0$ for $m,n>0$ and $P$ a $p$-group) by universal coefficients, since both Hom and Ext vanish for two torsion abelian groups of which one is prime to $p$ and the other is a $p$-group.
I guess the main point is that if $G$ has an element of infinite order then it has a nontrivial homomorphism to a $p$-group, because (1) it then has a nontrivial homomorphism to $\mathbb Q$, and (2) every nontrivial subgroup of $\mathbb Q$ has a nontrivial homomorphism to a $p$-group.