My granddaughter was the victim of a pedophile. It was a female. It ruined her childhood, and she will never be a normal person. I know you believe men and women are different, but the crime is the same no matter the sexes involved. In this case whatever is good for the goose is good for the gander.
Prison at a minimum. It's not about curing them but protecting the innocent.
As for mental illness, it is arguably one of the most fungible and abused excuses in our society. Anyone who does not conform or behave to the rules of society can be labeled with it. And that can include criminal activity.
It can be an excuse for incarceration or exoneration, depending on the mood of a prosecutor. On the innocent as well as the guilty. However, as an excuse for the assault of an innocent, it certainly is definable as a "mental illness." But there can be no excuse for allowing such a person to be irresponsibly set free in our society to repeat the offense.