Rigorous Justification of the Whitham Modulation Equations for the Generalized Korteweg–de Vries Equation