The President, and government, will only control the militia when a part of them is in the actual service of the federal government, else, they are independent and not under the command of the president or the government. The states would control the militia, only when called out into the service of the state, and then the governor would be commander in chief where enumerated in the respective state constitution.
Alexander Hamilton