Court sentences 23-year-old sex offender