Christopher Adjei, 29, of Riversdale Road, Ramsgate, pleaded guilty to assault with intent to commit a sexual offence and battery.
Kent Police said he grabbed the woman, tried to cover her mouth with his hand, and forced her to the ground in the early hours in Church Lane.
Adjei fled the scene when the woman asked what he wanted.
Officers traced Adjei after his DNA was found on the victim's coat and were able to piece together his whereabouts on 14 June 2014, the night of the attack, based on his bank details and a train ticket to Canterbury.
Det Sgt Daniel Aylett said Adjei put the victim through a terrifying experience.
A warrant was issued for Adjei's arrest after he walked out of a Canterbury Crown Court hearing in August.
He was arrested the following month in the Thanet area.
Adjei was also ordered to spend two years on extended licence after his release from jail as part of his sentence.

Kuba Moczyk, 22, died in hospital after he was knocked out in an unlicensed fight at the Tower Complex, Great Yarmouth, Norfolk, on 19 November.
A memorial mass has been held at St Mary's Church in the town.
Father Philip Shryane told the congregation Mr Moczyk' was a "good man" whose "life was boxing".
More on this story and others from Norfolk
He said Mr Moczyk was "a young man with a good heart, with so much to give and so much to look forward to... but always a gentle smile".
His uncle, Marcin Smigaj gave a tribute, in Polish, on behalf of the family. Mr Moczyk was due to be cremated.
Mr Moczyk, originally from Poland, worked at a chicken factory and lived in the town.
His trainer Scott Osinski said earlier that Mr Moczyk was winning the fight when he took the fatal blow.
His opponent is believed to be aged 17.

Rojo escaped with a yellow card from referee Craig Pawson for a two-footed lunge on Wilfried Zaha during United's 2-1 win at Crystal Palace on Wednesday.
The Argentine also avoided a red card for a similar challenge on Everton midfielder Idrissa Gueye in the 1-1 draw at Goodison Park on 4 December.
"Rojo is playing phenomenally," said Mourinho.
Media playback is not supported on this device
Palace boss Alan Pardew described Rojo's tackle on Zaha as "dangerous".
"It's another two-footed tackle, I think he did one before [against Everton]. He was a bit fortunate to get away with that," he added.
However, Mourinho defended the former Sporting Lisbon player, adding: "He is playing really well - emotional but very clean."
Former England striker Alan Shearer, speaking on Match of the Day, said Rojo should have been sent off for his challenge on ex-United player Zaha.
"We saw it against Everton and he got away with it. You cannot tackle like that. It would have changed the game completely," added Shearer.
Wednesday's result leaves United sixth in the Premier League table, six points behind fourth-placed neighbours Manchester City and 13 behind leaders Chelsea.
United recorded back-to-back Premier League wins for the first time since August as Zlatan Ibrahimovic struck late to deprive struggling Palace of a point.
Ibrahimovic, 35, has scored nine Premier League goals since joining on a free transfer from Paris St-Germain in July.
Mourinho revealed after the Palace win that he has warned Ibrahimovic that if he wanted to end his career with a holiday, he should stay away from England.
"Zlatan has passion and plays like that. The personality is there," added the United boss.
"I told him England is not the best place to go on holiday when you are a rich guy with a phenomenal career. If you want holidays don't come to England.
"You come if you want to prove yourself, to show what you can do. His decision to come was based on that and I am very happy."
A man has been jailed for four years for attacking a woman in her 20s in the street in Canterbury.
[NEXT_CONCEPT]
Friends and family of a boxer with a "gentle smile", who died after being knocked out in his first fight, have attended a memorial mass.
[NEXT_CONCEPT]
Manchester United defender Marcos Rojo is a "clean player with an aggressive nature", says manager Jose Mourinho.