The president-elect has railed against “woke” generals and others who have pushed for diversity initiatives in the ranks.