Officers take an oath to preserve and protect the Constitution, not the President (see below). Enlisted do swear to obey commanding officers and the President, but only according to regulations and UCMJ. Bottom line, the command of the military takes no oath to serve the President.