1-if the student is a female, and this occurs when trying to register in any female section, then go to the Office of registration to update his attribute, and vice-versa.
2-If this occur in specific section, then report it to your college with the Course number (CRN) to confirm that the gender attribute has been set correctly for this section.