Thing is, today's militaries tend to leave use of force as a last resort, not everything is a guns blazing, shoot first and ask questions never response. Even so, there are also times when Starfleet has responded in that manner. And I guarantee, if there was anything on Earth to explore today it would be handled by the military. Hell, quite a bit of authority figures at NASA are military officers. Chris Hadfield is arguably one of the most famous modern-day astronauts and he was an active-duty serving military officer when he was in command of the ISS.Their prime role as explorers and diplomats certainly supersedes their military power. They bend over backwards to avoid violent conflict. That doesn't mean they won't use force, but they (in particular Picard) do everything possible before resorting to violence.
There is literally no difference between Starfleet and militaries of today other than the environment they work in. And the fact that its officers deny they are a military for some reason.