A weak link of two superconductors with s-type pairing through a ferromagnet has been theoretically investigated in the regime of a nonequilibrium spin-dependent distribution of electrons over energy levels in a ferromagnetic interlayer. It has been shown that, under the given conditions, the triplet component of the supercurrent-carrying density of states, which does not participate in the Josephson current transfer under equilibrium and spin-independent nonequilibrium conditions, is involved in the Josephson current transfer through the junction. In this case, the standard supercurrent transferred by the singlet component of the supercurrent-carrying density of states remains unchanged as compared to the case of the equilibrium distribution of electrons in the interlayer. An additional current transferred by the triplet component is controlled by a voltage that controls the specific shape and the degree of nonequilibrium of the electron distribution function in the interlayer. Depending on this controlling parameter, the additional current can substantially amplify or attenuate the standard supercurrent and also switch the junction between 0 and π states.