The argument via K-theory proceeds as follows.
There is a map $K(X) \to H^*(X; \mathbb{Q})$ given by the Chern character. If $X = S^{2n}$, then in fact the image of the Chern character lies in $H^*(S^{2n}; \mathbb{Z})$. For $[E] \in K(S^{2n})$, we have
$$\operatorname{ch}([E]) = \tfrac{(-1)^{n+1}}{(n-1)!}c_n(E).$$
In particular, if $S^{2n}$ admits an almost complex structure, then $\frac{(-1)^{n+1}}{(n-1)!}c_n(TS^{2n}) \in H^{2n}(S^{2n}; \mathbb{Z})$. Now note that
$$\tfrac{(-1)^{n+1}}{(n-1)!}\langle c_n(TS^{2n}), [S^{2n}]\rangle = \tfrac{(-1)^{n+1}}{(n-1)!}\langle e(TS^{2n}), [S^{2n}]\rangle = \tfrac{(-1)^{n+1}}{(n-1)!}\chi(S^{2n}) = \tfrac{2(-1)^{n+1}}{(n-1)!} \in \mathbb{Z}$$
so $(n-1)! \mid 2$ and therefore $n \leq 3$. As mme points out, a separate argument is needed for $n = 2$.
A good reference for this argument is Konstantis and Parton's Almost Complex Structures on Spheres.