At first glance this question is easily answered: Gene Roddenberry says it isn't, Picard says it isn't, and so it isn't.
It is not that simple. It is completely dependent on how narrowly you define the word military.
- Is Starfleet an armed force? Yes. (any episode where armaments are used)
- Is it tasked with protecting the Federation from foreign enemies? Yes. (e.g. DS9's Dominion War, many Borg incursions).
- Is it an authoritarian operations consistent with contemporary militaries? Yes. (Any episode where someone is threatened with an insubordination charge for disobeying orders).
- Does it have a separate judicial system separate from civilian Federation courts? Yes. (TNG:The Measure of the Man, TNG:The Drumhead).
If you take the broadest definition of military - that is, armed forces - then Starfleet is clearly a military organization. Starfleet has similar structure, operations and authority to contemporary militaries.
However, if you narrow that definition of military to be: forces with the primary mission of making war, they absolutely are not.
It's not the size of your gun, it's how you use it.
The military in the United States is somewhat unique in the world because it does not engage in domestic police actions (this is reflected in the Posse Comitatus Act). The military training reflects their primary mission: destroy the enemy. It is a war-fighting force in the same way the militaries of this world's past: us versus them, destroy or be destroyed, and win at almost any cost.
Starfleet's primary mission isn't to make war - that is until the Federation is drawn into a war. DS9's Dominion War undeniably cast Starfleet as a military operation. Similarly, TNG:Yesterday's Enterprise shows Starfleet operating in a fully militarized manner. These are undeniable examples of Starfleet functioning as the de facto military of the Federation.
However, those exceptions seem to prove the rule that, when compared with contemporary and historical military forces, Starfleet is not about making war but enabling the Federation's peaceful exploration.
Put another way, by today's definition of military, which appears consistent with Gene Roddenberry's usage, Starfleet isn't a military.
What's in a name?
More importantly, Starfleet is a realization of changed values. Military tactics have evolved over time on Earth to recognize laws that define what sort of violence is allowed (chemical weapons are banned, for example). All of this points to a higher appreciation for life, the value of life, as expressed so often in Star Trek: to seek out new life and civilizations. Implied in that statement is that life of all kinds is to be valued. The Prime Directive indicates that life should be valued, even when we disagree with their values.
National military operations in the world today don't operate that way (World War I, World War II, Vietnam, Iraq, Afghanistan). No contemporary military values life in the way that Starfleet does. Our military's primary mission is always to complete the objectives given, regardless of the number of casualties on the opposing side (and often without much consideration to risking civilian life).
That is a very distinct and profound difference. That is likely what Gene Roddenberry was referring to and the major difference Picard would understand when using the word "military."
In the same episode where Picard says, "Starfleet is not a military organization." Just prior to that line he also says:
Despite misgivings, I have agreed to Starfleet's request that we take
part in these wargame exercises.
Wargames. Why does a non-military organization engage in war games?
Because with the Borg threat, I have decided that my officers and I need to hone our tactical skills. In a crisis situation, it is prudent to have several options.
Starfleet clearly recognizes the safety and security of the Federation are important and that training for that possible military action is important.
Is Starfleet civilian or military?
The author's original question was which, civilian or military?
By today's standards, it is neither military or civilian.
The closest (poor) analog I could muster is the United States National Oceanic and Atmospheric Administration (NOAA) which does conduct law enforcement operations (meaning they are armed) for limited purposes but NOAA's primary mission is scientific.
Using the 24th century standards, Starfleet is absolutely not like the Cardassian, Romulan, or Dominion operations which are very clearly military forces as we would define them today - meant for making war - so Picard's remarks are consistent with a more nuanced understanding of what a military does.
And so, in the 24th century, clearly Starfleet is not a military though it will engage in military operations when necessity dictates.