Aiden Hughes, with an address of Balmoral Road, Bangor, posed as a teenage boy before meeting his victim in a Belfast park.
During the meeting, he touched the girl over her clothes. He later admitted the charge against him.
Belfast Crown Court heard Hughes had marriage problems and took to the internet to "escape the stress".
A prosecution lawyer told the court that Hughes met the girl on a social networking site, while pretending to be a 14-year-old called Matt Smith.
They began exchanging emails which soon became sexual.
Hughes asked the girl for meetings and later told her he was 20, and not 14 as previously stated, and admitted his name was Aiden.
His victim reported that he made her feel "a little bit sorry for him".
A defence solicitor for Hughes said he was a young man who did an extremely stupid thing and was deeply ashamed of his actions.
The judge ruled Hughes be put on the Sex Offenders' Register for ten years and also made him the subject of a ten-year Sexual Offences Prevention Order, disqualifying him from working with children and restricting his use of the internet.
On his release from prison, he will be required to live at an address approved by the authorities.
The judge told Hughes the impact on the then 14-year-old could not be ignored or forgotten and that adults deliberately making contact with young children for sexual activity would not be tolerated.
A 30-year-old man, who sexually assaulted a 14-year-old girl he met online, has been jailed for 12 months.