Education secretary Gillian Keegan had indicated that young people could be mature enough at 16 to choose their gender