Prostitution by itself is not wrong, but the social dynamics around it put the prostitutes in a weak position, in which they are at high risk of abuse and exploitation. Under this interpretation, prohibiting prostitution harms the few prostitutes which would mot be abused and their clients, but benefits the majority of prostitutes who would be abused and is overall positive for society.
The logical structure of the argument is sound. As a society, we regularly accept to forbid behavior that is not necessarily harmful, but has an very high risk to be, and a limited social value if allowed. Gun laws, speed limits, age of consent laws follow this principle. [Aside: the social benefits of gun ownership are valued more in the US than in Europe, therefore gun laws are more permissive]
There are however at least three problems with this argument:
1. It supports punishing pimps and clients, not the prostitutes themselves. This is in fact the approach chisn by e.g. France and Sweden, but not by the US.
1. It assumes that a substantial proportion of prostitutes are exploited or abused and that there are no alternative policies to prevent this.
3. It ignores second order effects. It assumes that forbidding prostitution will eliminate it and doesn’t consider the additional risk of harm resulting from pushing prostitution to the black market.