Matt Tyler, 31, struck when the victim entered a cubicle at the Spindles Shopping Centre in Oldham, Greater Manchester, last September.
The filthy honk, of Parkway, Chadderton, pleaded guilty at an earlier hearing at Manchester Minshull Street Crown Court to two offences of sexual activity with a child, said law enforcement officials.
Tyler was traced by authorities after his victim raised the alarm with security staff at the shopping centre.
Detective Inspector Jamie Daniels, of Greater Manchester Law Enforcement, said: “The victim was at a very vulnerable time of his life when this happened.
“Tyler took full advantage of this for his own gratification and subjected the boy to a degrading sexual attack.
“The boy is now trying to move on from what happened and I hope today’s result helps him come to terms with the incident.
“I would like to pay tribute to staff and I am thankful that the court has recognized Tyler’s danger to vulnerable children and elected to protect the public from him in the manner it has.”
Tyler was also ordered to sign the Sex Offenders Register for life. No words about the racial classification of the victim.