Bahram Hosseini was arrested after travelling from his home in West Yorkshire to Newcastle as part on an online trap to hunt out paedophiles.
Hosseini, 48, exchanged explicit messages with a fake internet forum profile believing he was chatting to a youngster called Joey.
Leeds Crown Court heard the profile was in fact set up by a group called Guardians of the North.
Hosseini travelled from his home in Ponefract to Newcastle on July 9 this year believing he was going to meet a teenage boy.
He was instead confronted by members of the group at the city's railway station and police were contacted.
Catherine Silverton, prosecuting, said Hosseini had sent messages to 'Joey' stating that he was 48 years old and was looking for a boyfriend for "love or sex".
Hosseini continued to send sexual messages despite being told that 'Joey' was only 14 years old and lived with his mum.
Hosseini made arrangements to meet him and suggested that they stay in a hotel before travelling to the north east.
Miss Silverton said Hosseini, of Wakefield Road, Pontefract, refused to comment when interviewed by police.
He pleaded guilty to attempting to meet a boy under the age of 16 following sexual grooming.
Mohammed Raffiq, mitigating, said Hosseini had no previous convictions and had come to the UK as an asylum seeker.
He said: "He escaped from the religious intolerance in Iran. This will not make his position any better if he were to go back there. He is clearly in danger of his life if he were to go back there."
The barrister said Hosseini was sorry and ashamed of what he had done and for the embarrassment he had caused his family.
Hosseini was sentenced to 410 days in prison, suspended for two years. He was also ordered to take part in a 15-day rehabilitation programme and do 100 hours of unpaid work.
Hosseini must go on the sex offender register for 10 years.
Judge Penelope Belcher said: "No child was in in fact exposed to risk. But you did not know that and plainly you were willing to meet with a 14-year-old boy."
The judge said it would be a matter for an immigration and asylum tribunal to decide if Hosseini should face deportation.