A man who sexually assaulted a teenage girl has been put behind bars.