This does seem wrong. Unfortunately, it doesn't much matter what country you look at, rape is still not treated particularly seriously.
IMO rape should be treated much more serverely, as it is a crime that ruins the victim's life just as surely as any form of bodily harm does, or even attempted murder.
But reading the information in the BBC article, I find it unclear whether the judge could have given a prison sentence, as apparently the law now clearly states that offenders under 25 should not be given custodial sentences.
I don't agree with this line of thought for a crime such as rape, but the law is the law, and must be applied until such time as it has been repealed.
Irrespective of the age of the rapist at the time the crime was committed or reported, he apparently raped a child under the legal age of consent and should thus have been charged with that as well as with rape.