I'm going to break my rule of not bringing episode quotes into this and point out that in a season 1 TNG episode, Hide and Q, Q refers to Starfleet as a military.Short Answer: NO
Long answer: Have I posted on this subject before? Can't remember. But I have been watching TNG episodes with my grandparents during our quarantine, and Picard LITERALLY SAYS in the Season 2 episode "Peak Performance" that Starfleet IS NOT a military. The exact quote is "Starfleet is not a military organization. Its purpose is exploration." Whatever may have been the case in TOS, in TNG it is explicitly stated that Starfleet is not a military organization.
And what's more, that episode was written by Gene Roddenberry Himself. So what, do we ignore the quote from the all knowing omnipotent being saying Starfleet is a military in a season 1 episode written by Gene Himself, just because a season 2 episode written by a new writer who only went on to write two other episodes in the entire franchise has Picard saying it isn't a military?PICARD: You interfered with our Farpoint mission. You threatened to convict us as ignorant savages, if, while dealing with a powerful and complex life forms, we made the slightest mistake, and when that didn't happen
Q: The Q became interested in you. Does no one here understand your incredible good fortune? Seized my vessel. These are the complaints of a closed mind too accustomed to military privileges.
This is why we should not be building this argument around episode quotes. The various writers in the franchise has always been contradicting each other on this matter, and some writers have even been contradicting themselves. For example, not long after Roddenberry wrote an episode which does refer to Starfleet as a military, he banned one of the novel writers from writing writing anymore Trek novels just because she dedicated a TNG novel to a friend of hers killed in military service and Roddenberry came down on that saying "Star Trek is not about the military." Which is another thing to consider, Starfleet didn't stop being a military in TNG because of some sort of worldbuilding retcon or whatever, it only stopped being a military in TNG because Roddenberry suddenly and abruptly decided he now hated the military.
The fact of the matter is, despite the franchise's attempt to say Starfleet isn't a military and make that the Official Party Line, Starfleet still behaves exactly as a military does, even to the point of replicating all the ceremonies and traditions of the military exactly down to the littlest details. If anyone seriously expected us to believe Starfleet isn't a military, they should have tried a bit harder to not have Starfleet mimic the military at every turn save for not actually admitting to being a military and actively and repeatedly denying it.