Throughout, let $X$ be a *connected finite* CW-complex. If the universal covering of $X$ is contractible, then $\pi_n(X)=0$ for all $n \geq 2$. In this case $X$ is a model for $B\pi_1(X)$.

I am wondering whether this is the only reason why higher homotopy groups vanish above a certain degree. More precisely:

Question:Let $k \geq 3$ be an integer. Can it happen that $\pi_n(X) = 0$ for all $n \geq k$ and $\pi_{k-1}(X)\neq 0$?