In Blundell and Blundell's Thermal physics book there is a chapter on the explanation of the Boltzmann distribution. It is explained that for canonical ensemble with a reservoir at temperature $T$ in equilibrium with the system, the probability that the system is at energy $\epsilon$ is proportional to: $$ e^{-\frac{\epsilon}{k_B T}} $$ which is called the Boltzmann factor.
Then, when considering velocity distributions in monatomic gases they consider a single particle acting as a system and the rest of the energy as a reservoir, so it should follow the Boltzmann distribution in terms of energy. However, the velocity distribution in a fixed direction itself is said to be proportional to a Boltzmann factor too. This time, since the relevant energy is $E = \frac{1}{2}mv_x^2$ the distribution becomes: $$ g(v_x) = C e^{-\frac{mv_x^2}{2k_B T}}$$ What I do not understand is why the distribution is known to follow this factor. It is supposed to apply to the energy of the particle, but why does it apply to the velocity distribution too?