Unfortunately, rape is not always a sexual urge. A lot of times it is dominance and violence, which castration will not help with. There are very few studies, but some material still shows about a 5% recidivism rate (Only for rape, sexual assault was not accounted for) for rapists that have been castrated, physically or chemically. Rape, itself, has about a 16% recidivism rate for sexual crimes after conviction (not just rape, but sexual assault, as well). So, that's a lot of work and appeals to castrate a rapist to lower their expected recidivism about 11%, but not to zero.