Legal prostitution isn't a solution. It's a cop-out. Education is. Especially of men who think they are entitled to have sex and see women as objects.
Every documented legalization of illegal substances or activities would disagree with you. Legalization and regulation would allow those being exploited to actually report it to the authorities without fear of being arrested. Prohibition does not work, and it never has.