The is a tangible difference in the type of coercion that exist in forced labour compared to wage slavery, just like there is a difference between the coercion in rape compared to prostitution.
They were still slaves.
My employers tell me what to do, yes; but have you ever thought that perhaps I like the exchange, and find it valuable to have someone who tells me what to do to get to an end result where I get a decent, reliable wage for doing so?
And how under socialism am I going to be freed from having to labour? If nobody labours, nothing will get done. Conversely, if I labour and see a massively reduced benefit from doing so personally, I will hardly be inspired to work hard.
I won't drag this thread deeply off course with a rundown of Marxist thought, but if you're interested in some light reading (~60 pages) "An Introduction to Marxist Theory" by Ernest Mandel elaborates upon this in a digestible manner. There's also Paul Cockshott's "Towards a New Socialism", which explores the implementation details of proposed alternatives to capitalism. He writes about how me might "maintain a high standard of living and somehow don't have to work [for a privileged few] for a living."
By that argument, wage labor is slavery just as much as prostitution is rape.
So, yeah, if you're that kind of socialist, there's a coherent argument for that point. But if you aren't, you may have trouble justifying why economic coercion overrides consent in one case but not the other.
Myself, I'm somewhere in the social democratic (US-style “democratic socialist”, perhaps, but not what that label would apply to outside of the US) range, and I agree that there is in fact an element of economic coercion in many but not all cases of work-for-pay in a capitalist economy (including, but not uniquely so, prostitution) which makes consent unclear in the general case and clearly absent in some specific cases, but that the best corrective is alleviating the fundamentally coercive nature of the system by improving the social safety net, not trying to ban the kind of work people are more likely to do only if economically coerced (which just leaves people either coerced into some other kind of work or, stuck in the conditions that they sought to escape by accepting distasteful work under duress, or—often—still coerced into exactly the same undesirable work, but without effective legal recourse for additional abuses in the working relationship.)