Starfleet is the uniformed armed forces of the Federation.
"Uniformed armed forces" is a specific legal category used in international law that distinguishes the officially sanctioned armed forces of a country from irregular armed cadres such as terrorist organizations and resistance movements. The two are judged by different standards in the ICC and war crime tribunals; uniformed forces can be held as prisoners of war while irregular militants are unlawful combatants and/or terrorists.
The United Federation of Planets probably isn't
based on the Geneva Conventions and old Earth notions about the legal status of uniformed armed forces would be considered quaint and primitive, especially by the standards of, for example, the Vulcans, who were already exploring space when humans were still fighting over hunting grounds. However the Federation chooses to regulate its war-fighting capability, there's little reason to assume their standards will be the same as ours, or even BASED on ours, especially since Earth was the least advanced and the least mature both technologically and politically of the Federation's four founding members.
What's very interesting, also, is that the Vulcan High Command in ENT doesn't appear to be a military organization either. To the extent that the Vulcans even have a CONCEPT of "military" it's clearly an armed uniformed force, but whatever the Vulcan word for such an organization it clearly bears little resemblance to conventional Earth definitions, despite the fact that it very CLOSELY resembles Starfleet.