Convicted sex offender Michael Butler, 33, from Redcar , was still sending texts to the girl as he travelled to meet her after grooming her online.
But waiting for him at Newcastle Central Station were members of Dark Justice, an organisation which aims to catch online predators in sting operations.
The group then handed him over to the police.
Prosecutor Harry Hadfield told Teesside Crown Court that Butler was on bail that day on March 26 when he expected to meet her for sex.
Butler had asked the girl to send him sexual images of herself, but she told him that she had learning difficulties.
He had served a 15 months jail sentence for sexual activity with a girl under 13 and attempting to arrange sexual contact with a child which was imposed at Burnley Crown Court in July 2014.
Butler was given a 10-year Sexual Offences Prevention Order banning him from having contact with children under 16 and from using the internet unchecked.
He breached that by making friends with a stallholder on Redcar market and associating with his three young children.
He also used his mobile phone to view child abuse images/videos and deleted the history. But his public protection police officer was suspicious and an internet expert retrieved the evidence.
Mr Hadfield said that Butler had also used the name Michael Smith, without notifying the police what he had done.
He said that “The child” invited Butler to meet her at the railway station and he was chatting to her by text on the way.
Paul Cleasby, defending, said that no meeting could have taken place and there had not been any harm.
He said that there was no suggestion that Butler had committed any sexual offences against the market man’s children.
Mr Cleasby added: “In mitigation he has given early pleas of guilty and he hopes that during the inevitably lengthy prison sentence it will allow sufficient time for him to work with the authorities to minimise the risk that he is supposed to pose.
“He is realistic, he accepts that a significant custodial sentence will follow.”
Judge Peter Armstrong told Butler: “I take the view that in the course of the text messages it was indicated to you that this girl named Amy was a vulnerable child, but nevertheless you persisted in meeting her.
“Clearly penetrative sexual activity was intended.”
The judge added:
“You are clearly assessed as being someone with a high risk of sexual offending towards children.
“The Sexual Offences Prevention Order has not prevented that episode by you but happily no child has been sexually assaulted by you.
“I hope that the sentence I pass on you will enable you to undergo sexual treatment while in custody.”
Butler, of Queen Street, Redcar, was jailed for three and a half years after he pleaded guilty to two breaches of a SOPO, failing to comply with a notification requirement over the name change, attempted sexual grooming and accessing the Internet without informing his supervising officer.
He must register as a sex offender for life.