Starfleet is the military.
There is absolutely no evidence to the contrary.
Personally, I do not disagree that Starfleet has pretty much always been portrayed as having many aspects and roles that reflect those of the military, and that it does not appear that the Federation as a whole has any other dedicated force that fills these functions. (Individual planets it seems may have such forces that exist in parallel to but not directly under Starfleet Command, as Earth did prior to the founding of the UFP but after Starfleet was already well-established as an apparent outgrowth of organizations like NASA.)
So yes, for most intents and purposes within Trek
, SF is the military. But how militaristic it really is has always been debated, and the portrayal of such subject to many differing interpretations by various writers under varying story constraints. And to say that there is "absolutely no evidence" that Starfleet is at least nominally distinct from the traditional concept of a military is not quite accurate:
PICARD: Starfleet is not a military organization. Our purpose is exploration.
("Peak Performance" [TNG])
FORREST: You think you'll be comfortable with the military on board?
("The Expanse" [ENT])
Granted, one of the above statements applies to the 24th century of a different timeline and the other applies to a time frame preceding the incorporation of the UFP, but nevertheless the exchange in Into Darkness
clearly follows from decades of ambiguity and debate among both fans and show-runners, and was no doubt written as an acknowledgement thereof.