Lorraine Telford, of the CPS, said: “Rahamim Shy is a predator who was fully prepared to commit unspeakable acts against a child for his own sexual gratification.
“It was clear from his explicit conversations and items he brought to England that he had only one intention, to commit rape against what he knew was a vulnerable child.
“The fact the child in this case did not exist makes no difference.”
Before the trial, the defence argued that because Shy was in the US at the time of the messaging, he was jurisdictionally exempt from prosecution, the CPS said.
However, the prosecution successfully argued English courts have the jurisdiction to try offences committed abroad that are intended to result in criminal offences in England.
He was found not guilty of possessing a prohibited image of a child.
Shy previously worked as a senior adviser for Pakistan and Afghanistan during the Obama administration.