I'm not so sure of that. Kirk very much considered himeself a soldier. So did Nog, IIRC. The only evidence we have that Starfleet itself doesn't consider itself a military is that one Picard line. But that's just plain bad writing.
I guess it's perspective. Nog and O'Brien often called themselves soldiers, but they entered Starfleet in times of war, so their view was very much clouded by that. Sisko is another, but he apparently fought in the Tzenkethi war, and his wife was killed by the Borg - that's going to affect your outlook dramatically.
Those considering themselves explorers, Picard and most of the D-crew, Janeway most prominently, must have joined up when there was a time of peace with the Klingons, the Romulans were quiet, and aside from a few border skirmishes with the Cardassians and Tzenkethi, there didn't appear to be much conflict. Janeway of course was a scientist, so she's going to push the exploration angle more than someone like Worf.
The only evidence we have that Starfleet itself doesn't consider itself a military is that one Picard line. But that's just plain bad writing.
Then again, Picard hardly speaks for all of Starfleet. Just because HE doesn't think Starfleet is military doesn't mean it actually is not. He could just be in denial...
Or the Starfleet he signed up for has changed. He used to command the Stargazer, a ship exploring the far-reaches of the known galaxy. The Enterprise-D was supposed to do the same, albeit in an even less militaristic manner, given his ship was full of civvies and kids.
They ended up pootling about Federation space for the most part, perhaps an example of a Starfleet policy shift. Maybe this is due to the re-emergence of the Romulans, the first real contact with the Ferengi, the conspiracy bugs, the Borg etc... Then the Dominion turns up and Starfleet faces war with the Klingons for a while too.
Picard ends up on a battleship, armed to the teeth, as far away from the Enterprise-D's original mission as it was possible to be. He's probably pissed off. I would be.