It seems that the whole argument revolves somewhat around semantics, and this (along with internal inconsistency of the way things have been portrayed in various productions) is partly we may never reach a satisfactory resolution. Starfleet (both in the 22nd and 24th century) has explicitly been stated to be something other than a military. Some argue that because it is structured like one and often behaves like one, it must be a military. It seems to me that the distinction others are making is that a military's primary purposes are combat and defense, with its other roles being incidental to those. Its raison d'Ítre
is fighting enemies and defending against potential enemies, even though it may also do other things. Starfleet seems to be the opposite, its primary purposes being exploration and peace-keeping, with its combat roles being taken on reluctantly when necessary, perhaps because there is simply no other organized force capable of fulfilling them.
On the other hand, in the 23rd century SF has been referred to explicitly as a military. This is of course because that's how the writers/producers were thinking of it at the time, but it makes me wonder if during periods of conflict Starfleet might somehow be "militarized," and then "de-militarized" when there is no active conflict. The UFP was portrayed as being continually on the brink of outright war with the Klingons and Romulans, which would naturally be a reason to ramp up Starfleet's defensive and offensive roles, whereas in the 24th century when the Klingons became allies and the Romulans went into isolation these roles were downplayed and SF returned to its original purpose of exploration. Later, after the Borg and Dominion threats presented themselves, it was re-militarized. (Conveniently, Picard's statement in TNG precedes this turn of events.)
In other words, perhaps the UFP of the mid-24th century might indeed have been operating under a "no standing space military, beat ploughshares into swords when needed" attitude, as it might have done in other periods when there was no pressing need to wage war or prepare to wage it. Whether this idea is realistic or not, I don't know, but it seems to at least roughly fit the guiding concepts the showrunners were working under at the time, and moreover seems to fit with those of the people responsible for the new movie, where we see Marcus pushing for greater militarization in response to looming threats. Could the answer be as simple as "SF is a military when acting as one and isn't when it's not," potentially with some grey areas during transitional periods?