He wouldn't president, though and several presidents have been sworn in outside of DC. The presidential term ends at a specified date and time, regardless of if no election happened. It would be then up to the military if they want to obey someone that objectively is not president anymore.