I think prison is the correct response, yes. You lock them away so they can't hurt others, (hopefully) rehabilitate them so they won't do it again and then release them to (hopefully) be productive members of society.
It's worth noting that not all rapes are men dragging women off the street or drugging them. Does it make it right or less of a crime? No, it does however make it perfectly possible to rehabilitate them and show them what they did wrong. Likewise the duration of their sentence will reflect the crime they committed.
It's also worth noting that if popular rumor is to be believed, prison isn't a fun place for rapists, so they're hardly getting a free ride here.
I've sure everyone advocating death and castration has lived a perfectly charmed life and never made a mistake or required a second chance ever.