Graham Paterson (49), of Brandon Court, Motherwell, was also put on the sex offenders register for an indefinite period when he appeared at Hamilton Sheriff Court on Monday.
He was convicted of assaulting the 32-year-old woman with intent to rape her in Muir Street on October 2, last year.
The court heard the woman had travelled from Dublin. Her phone was dead, she was trying to contact her boyfriend and asked Paterson where she could get a taxi.
Passing sentence, Sheriff Marie Smart told Paterson: “She trusted you because, like her father, you had white hair. She thought she would be safe, but she was absolutely wrong.”
A jury were told that Paterson grabbed her and a struggled ensued before she managed to break free. He was traced through CCTV.
In evidence, Paterson admitted his behaviour was “shocking”, but insisted he was only trying to get a kiss because he thought the woman fancied him.
He denied having any intention to rape her.
Defence advocate Lili Prais told the court: “He accepts the victim did nothing wrong and what he did was terrible. He does not minimise his behaviour or the effect on his victim.
“There was no premeditated plan. It all happened in a matter of moments - he describes it as a moment of madness.
“He had consumed a considerable quantity of alcohol - 12 pints of lager and three double vodkas. That is perhaps not an excuse, but an explanation.
“He is supported in court by his elderly mother and is aware of the effect this had on both her and the victim. For that he is deeply ashamed and remorseful.”
Ms Prais suggested Paterson, who has had mental health difficulties, could be given a community payback order which would allow him to “address his issues”.
However, Sheriff Marie Smart told him: “This was a serious offence. The jury were satisfied that rape was your intention.
“You have no previous convictions, but I am satisfied that this can be dealt with only by a custodial sentence.”