A 34-year-old man has been sentenced to 40 years in jail after being found guilty of defiling an 8-year-old girl.