A detective constable has been sacked for gross misconduct after a panel decided he had a sexual relationship with a 16-year-old girl.