WASHINGTON—Mark Esper faces a Senate committee Tuesday in his bid to be secretary of defense. If confirmed, he would complete a noteworthy transformation within the Trump administration: the decline of the generals.

After President Trump took office, he frequently lauded “my generals” and installed several top military figures in prominent roles. But since then, often after friction over policy and personality, those men have moved on, and Mr. Trump has become less enamored of the appointment of those with military careers,...