The government entity that is, under the Constitution, charged with dealing with the executive branch in a case like this is the Congress. It is not the military. One of the reason the Constitution stipulates the Congress, not the military, is that the Founding Fathers were familiar with the history of Rome and knew the danger posed by a Praetorian guard. The Constitution does not say the military can remove a President, it says the Congress, and only the Congress, has the authority to do so.
I'll say it again:
If the occupant of the Oval Office is not eligible to the Office of President, he's not the President. The Congress only has the power to remove a President, and only for "treason" (as defined in the Constitution) and "high crimes and misdemeanors." No President, no impeachment by the House nor trial in the Senate.