Starfleet is definitely paramilitary, in that they use military style ranks and such, but it is not military at its core.
I like to compare Federation Starfleet to Heinlein's "Space Patrol" from the novel Space Cadet. they are paramilitary in organization but their focus is on peacekeeping and scientific discovery. The Patrol's members are expected to give up allegiances to their homelands and instead uphold allegiance to wider society as a whole and the Patrol specifically. not everything carries over (the book had some typical sexism for the time about why the patrol only took men, for example, and the Patrol serves alongside the space marines who were more traditional military, and so on) but i am convinced that this book partly inspired how the writers in TOS and TNG wrote Starfleet. (the section where Matt Dodson's mentor explains to him why the Patrol is only officers, by comparing it to the Marines, to illustrate the values of the patrol.. really feels like it would fit into Trek's starfleet. and given the existence of the MACO's during ENT, it could probably be transplanted verbatim to the 22nd century Earth Starfleet, which appears to be where much of the federation starfleet tradition started)
I like to compare Federation Starfleet to Heinlein's "Space Patrol" from the novel Space Cadet. they are paramilitary in organization but their focus is on peacekeeping and scientific discovery. The Patrol's members are expected to give up allegiances to their homelands and instead uphold allegiance to wider society as a whole and the Patrol specifically. not everything carries over (the book had some typical sexism for the time about why the patrol only took men, for example, and the Patrol serves alongside the space marines who were more traditional military, and so on) but i am convinced that this book partly inspired how the writers in TOS and TNG wrote Starfleet. (the section where Matt Dodson's mentor explains to him why the Patrol is only officers, by comparing it to the Marines, to illustrate the values of the patrol.. really feels like it would fit into Trek's starfleet. and given the existence of the MACO's during ENT, it could probably be transplanted verbatim to the 22nd century Earth Starfleet, which appears to be where much of the federation starfleet tradition started)