I actually must disagree. I think that the dystopia would have to be the default position for this to hold true. I don't see Starfleet as a dystopia within the United Federation of Planets, being the utopia.
I think what Starfleet is, technically, is a militarized science division that often comes into conflict with its own principles because of its interaction with lesser evolved civilizations, which force it to have to adapt to scenarios which a self-sustaining utopia does not have to encounter.
Or think of it like this. Starfleet acts like an event horizon which safeguards the utopia. If you can make it past the checks and balances of Starfleet's rigid entrance policies, then you can get subsumed by the utopia. If not, you get bounced out, much like Hawking radiation getting ejected from a black hole.
But I do not take this to mean Starfleet itself is a dystopia, because things would have to be generally unpleasant and bad. And although Starfleet is definitely totalitarian, it isn't always generally a bad place.
I think what we need to consider is that our current understanding of utopian and dystopian societies are limited, in part, by the tropes which play out in fiction. But if given serious thought, we find perhaps our versions of them have been stereotyped to bad Hollywood representations.
I think both utopias and dystopias, if they were to truly exist, would be much more complex systems than typically depicted.
I replied by stating it seems that The United Federation of Planets is a utopia in constant flux as it tries to retains itself amongst non-utopian worlds. This is, in part, directly due to the efforts of Starfleet to expand the Federation to other worlds. If they were left to their own, the utopia may stabilize. But there would be no advancement of knowledge or growth, since Starfleet would no longer serve a purpose.
The things with dystopias is that they tend to have totalitarian regimes which take over the utopia. Hence, become dystopias. As far as I can tell Starfleet has not attempted to overthrow the Federation, and exists democratically alongside it. The Federation still has its own democratically elected President, who like the Commander in Chief, also presides over a cabinet of Admiral who govern Starfleet.
It seems this gives them more of a Socialized Democratic feel where there are systems in check which prevent Starfleet from taking over entirely. Except, you know, when that becomes the plot line -- such as in the recent Into Darkness film which was exactly about that sort of thing.
Shout out to my friend, Joshua Ray Derke, for raising the interesting topic.