Calling him a "sexual predator," prosecutors asked for the maximum sentence of life in prison for Miles McFadden, 32, who was convicted in December on 10 counts of sexual assault and indecency with a child.
Judge Maria Teresa Herr granted the prosecution's request during a sentencing hearing on Friday.
McFadden was given life sentences on four charges of continuous sexual assault of a child and four charges of aggravated sexual assault of a child.
He was also sentenced to 20 years in prison on sexual assault charges and 10 years in prison on charges of indecency with a child.
Herr ordered that all sentences run concurrently.
According to testimony during McFadden's trial, he sexually assaulted the victim twice a week from the time the boy was 10 until he was 14.
During the hearing, prosecutor Jessica Frazier read a letter written to McFadden written by the victim.
It read, in part, "When something happens, you have three choices: You can either let it define you, destroy you or make you stronger. I have chosen to let it strengthen me."
The letter concluded, "All I want to say is that I forgive you and I'm still standing. God bless you, Miles."
McFadden shouted to the victim, who is now 18 and was in the courtroom, "I forgive you for lying as well".
Though the assaults took place while McFadden was employed as a Bexar County Juvenile Detention Officer, the victim was not among juveniles being detained at the facility.
Prosecutors said that there have been no allegations of sexual assault there involving McFadden.