Ednane Mahmood, from Blackburn in north-west England, fled his home after stating his desire to fight abroad. He was later persuaded to return by his family, who had reported him missing.
Mahmood was found guilty of planning acts of terrorism and disseminating terrorist publications in Manchester Crown Court last month and sentenced today.
"My assessment of you is you were and, to some extent, are a naive, unsophisticated individual who has so far lived a fairly sheltered life," Judge Michael Henshell told Mahmood.
Greater Manchester Police (GMP) said he (Mahmood) posted an image on Facebook that contained the words, "I wish I could fight in the cause... And then be killed, and then fight, and then be killed, and then fight, and then be killed."
On 18 September last year, he left his home to board a flight from Manchester Airport to Bulgaria, leaving a letter for his family.
Mahmood travelled by bus to Turkey to a town near the Syrian border. He tried to contact a number of people asking for urgent help, including one man who he believed was fighting in Syria at the time, GMP added.
Mahmood's requests went unanswered and, following an exchange of messages with his family, he returned to the UK.
