Starfleet is the military of the Federation, however they aren't a military as we know it. Their focus is much wider and has a far greater remit than conventional ones, however during conflict the focus would shift from exploration and peacekeeping missions to combat operations.
To that end I have no problem with terms like 'squadron' or 'wing' being used to describe a collection of ships smaller than a fleet.
Commander Austin Harris, First Officer, Deep Space Nine (by FltCpt. Bossco)
8.01 - Darkest Before Dawn
(Chapter 8 added, 12/09/2015)