Jeremy Flynn Castro, 25, pleaded no contest to the charges in May and could have been sentenced up to two years in state prison, prosecutors said.
On Dec. 23, 2013, Castro grabbed a woman from behind on a Pacifica street and groped her breasts and felt between her legs over her clothes. The woman screamed and struggled free, but fell to the ground and sustained minor injuries.
Castro fled but was found a short time later by police. He first told them he thought the victim was his wife and then said it was just a prank he learned on YouTube before he ultimately came clean.
Castro was also on probation in San Francisco for a similar incident, prosecutors said.
Castro remains in custody and additional conditions of his sentence are that he remains in the Choices Program, which is a rehabilitation program run by the Delancey Street Foundation that helps inmates learn to live their lives more productively.
He will have to abstain from alcohol and drugs, submit to chemical testing and register as a sex offender for life, among other standard conditions, prosecutors said.
Castro will have to pay the victim at least $1,080 in restitution and he will be prohibited upon his release from going near the victim.