Generals aren't elected. Furthermore, the Chairman of the Joint Chiefs isn't elected either, rather they are appointed by the President.
So, since Milley was appointed in 2019, the answer to the question I believe you're trying to ask is Trump. Trump appointed Milley.