The simplest argument is that the ranger must choose an animal in the plural, not a flock of animals. Jeremy Crawford even supports this interpretation (though in this case we're talking about wild shaping druids.)
There are also additional arguments that argue that a swarm is a valid option.
For example, consider the description of the Beast type in the Monster Manual:
Monster Manual p6
Beasts are nonhuman beings who a Naturally
Part of the fantasy ecology.
Then look at the sidebar in the section with the different types of swarms.
Monster Manual p377
The nature of the swarms
The swarms presented here are not ordinary or benevolent gatherings of
little creatures. They form as a result of some sinister or
A creature with the beast type is a natural creature. A swarm is something that does not happen naturally.
Of course, your DM can allow you to choose a swarm. However, be careful when making such a choice. Every flock, including the flock of ravens, has the following text:
The swarm can not regain hit points or get temporary hit points.
If you are unable to heal your crush, this can cause problems, especially given the pet's relative crushability in general.