No, it cannot happen. In [a paper by McGibbon and Neisendorfer][1], it is proven that if *X* is a 1-connected space and its mod-p-homology is non-zero in some degree, but zero in all higher degrees, then the $\pi_n X$ contain a subgroup of order p for infinitely many *n*. This can be applied to the universal cover of your *X*. [1]: https://doi.org/10.1007/BF02566349 "McGibbon, C.A., Neisendorfer, J.A. On the homotopy groups of a finite dimensional space. Commentarii Mathematici Helvetici 59, 253–257 (1984). zbMATH review at https://zbmath.org/?q=an:0538.55010"