Rex Moody had been due to stand trial after previously denying the charges.
But before a jury was sworn in, he changed his pleas and admitted charges of sexually assault and causing a child under the age of 13 to engage in sexual activity.
Moody, 43, of Carnoustie Close, Woodhall Spa, was placed on the sex offenders’ register for life and given an indefinite sexual harm prevention order which will restrict his behaviour after he is released from his jail sentence.
Judge Simon Hirst, passing sentence, told Moody: “You have spared the girl the ordeal of giving evidence.
“That is to your credit but in many regards that is the only matter that goes towards credit. You have a sexual interest in children.”
Andrew Vout, prosecuting, said that Moody indecently touched the girl on at least three occasions and also persuaded her to perform a sex act on him.
He told the court: “Her earliest memory of this happening was when she was aged four. She has no memories before then.”
Grace Hale, in mitigation, said that Moody, who attended a special school after he was diagnosed with dyslexia, had no previous convictions.
She said: “He is extremely remorseful. He is not without hope. In prison work will be done to minimise his risk of re-offending.”