An expert has said it would take the Scottish Prison Service 14 years to clear the waiting list for sex offenders seeking rehabilitation programmes.