We'll need a Security Force, rather than a military, if I may offer my two cents. While we as a nation should NEVER under any circumstances invade another country (And to that extent, avoid making alliances with other nations that would require military assistance), we need to be able to defend ourselves. As space travel becomes more common, we'll need to worry about potential terror threats, as well as invading nations, should we set up some sort of colony. It's unlikely that a nation would invade us early on, but it's a possibility, as well as piracy down the road.
The security force would also be used to respond to crises with citizens (Say someone loses it and has become a serious danger that regular officers cannot handle, we get involved to deescalate the situation). That, however, should be of a last resort, so that the mere sight of what essentially are space marines is enough of a threat with such a reputation that they would surrender immediately. And if not, we'd have the skills to hopefully end the situation without bloodshed. That's the goal of SWAT, after all, not necessarily to kill the bad guy but to bring them in. Justice can handle it from there.
In addition, we also need to be capable of performing SAR activities, as that is almost certain to be an issue, even at the beginning of the colony. Say an expedition gets stranded, or a rover breaks down outside of refueling or walking distance and a storm's coming, or an asteroid team loses comms.
All in all, we should not be an invasive force, but we need to be capable of providing rescue, civilian crisis deescalation, terror attack management and prevention, and defense of our borders from aggressive nations. God forbid North Korea somehow develops a space program.
That's just my opinion.
EDIT: Asset security is also going to be a big reason for having a defense force. If space terrorism does become a thing (Which it is almost guaranteed to, if space travel becomes more common and commercialized), we need to be prepared to defend our more sensitive assets with all necessary force.