A man has been jailed for 25 years for the rape and sexual abuse of a child in Gosport.