A former train manager has been jailed for sexually assaulting an 18-year-old woman after asking to check her ticket.