Eilenberg-MacLane Spaces - uniqueness? Given a positive integer $n$ and a group $G$ (necessarily abelian if $n > 2$) then a based space $X$ is said to be $K(G, n)$ if $\pi_k(X)$ is trivial for $k \neq n$ and $\pi_n(X) = G$.  First a pedantic question - is such a space necessarily a CW complex (as the wiki seems to suggest) or do we include that in the definition?
Secondly, for fixed $n$ and $G$, why is such a space unique up to homotopy equivalence?  I know Whitehead's theorem that says that a map between two CW complexes that induces isomorphisms on all of the homotopy groups (and a bijection on $\pi_0$) is necessarily a homotopy equivalence.  So if we have two (CW complex) $K(G,n)$'s say $X$ and $Y$ and we can cook up a map $f: X \to Y$ with $f_\# : \pi_n(X) \to \pi_n(Y)$ an isomorphism, then by Whitehead $X$ and $Y$ are homotopy equivalent.  However, why does such a map $f$ exist? 
 A: If $H$ is an infinite-dimensional Hilbert space, then $H$ is contractible, so it is a $K(G,1)$ with $G$ the trivial group, but not a CW-complex in any way.
A: If you have two $K(G,n)$'s, $X$ and $Y$, then note that $H_n(X;G)= G$ by Hurewicz, and then $H^n(X;G)=G$ by universal coefficients. Then any $K(G,n)$ classifies cohomology so $\hom(X,Y) =G$. Then the identity element of $G$ corresponds to a natural map between $X$ and $Y$. Repeating the argument with $X$ and $Y$ switched shows that this map has an inverse up to homotopy. 
A: For G a nontrivial abelian group we can construct $K(G,n)$ as a wedge of $n$-spheres along with $(n+1)$-cells corresponding to the relations of $G$, and furthermore also adding appropriate $k$-cells for $k>n$ to "close off" all higher-dimensional loops (this last bit is to ensure that $\pi_k(K(G,n))=0$ for every $k>n$). This is a CW complex, and given any other CW complex being a "$K(G,n)$", we can explicitly construct your desired function $f$ inducing isomorphisms on all homotopy groups. See the details in this note: http://www.people.fas.harvard.edu/~xiyin/Site/Notes_files/AT.pdf
EDIT: Added the extra bit about killing off higher loops, as pointed out by the comment by JHF below.
