Let $V \rightarrow X$ be an oriented rank-$n$ real vector bundle with equipped with bundle metric. Therefore it gives a classifying map $X\xrightarrow{u} BSO(n)$.
I would like to show that if the 2nd Stiefel-Whitney class of $V$ vanishes then it admits a spin structure. Here is what I have so far:
The "universal" 2nd Stiefel-Whitney class, for oriented vector bundles (with metric), can be identified as the element in $w_2 \in H^2(BSO(n),\mathbb{Z}_2)$ corresponding to the connecting homomorphism $BSO(n)\xrightarrow{h} B^2\mathbb{Z}$ in the classifying-space fiber l.e.s. obtained from a s.e.s. $\mathbb{Z}_2\rightarrow \mathrm{Spin}(n) \xrightarrow{\phi} SO(n)$.
Thus, $V$ having vanishing 2nd Stiefel-Whitney class implies that the composition $X\xrightarrow{u}BSO(n)\xrightarrow{h} B^2\mathbb{Z}$ is null-homotopic.
It should follow that $u$ factors through a map $X\xrightarrow{v} K$ where $K\rightarrow BSO(n)$ is the "homotopy kernel" of $B^2\mathbb{Z}$.
Note part of the fiber l.e.s. from two paragraphs above is
$B\mathrm{Spin}(n) \xrightarrow{B\phi} BSO(n) \xrightarrow{h} B^2\mathbb{Z}$; therefore we should get a map $B\mathrm{Spin}(n)\rightarrow K$.
My question is, at this point, how do we say we can lift $X\xrightarrow{v} K$ to a map $X\rightarrow B\mathrm{Spin}(n)$?