The five aggregates are Form, Feeling, Perception, Volition, and Consciousness. Form is the physical appearance of the individuals or the things. Such as body, material things, etc. Feeling is the response to the Form or to the material object. For example, ice is Form and cold is the feeling we have after touching the ice. Perception is our understanding and interpretation of those feelings which we develop after seeing, touching, holding or tasting the forms of different appearances. Volition is the act or the practical response by one due to the feelings they have develop after observation. Consciousness is dependent on all the other previously discussed aggregates. Such as, we have to see the forms to have feelings, and then we will act and will remember that event in our conscious mind. In future we will use this memory to evaluate similar events without any further knowledge about them.
Now, if we relate these five aggregates with gender and sex, it will go like this. Gender or sex is Form. Different individual observe the gender or sex with different angles and will develop feelings accordingly. For instance, sense of beauty, ugliness, love, hate, sex, and so on and so forth. People will interpret those feelings according to their understanding and knowledge. If someone has negative feelings for gender they will have negative perception about gender and interpret gender in a negative way. Due to this negative perception their volition will be discriminating against gender/sex. Such discriminating behavior will be part of their thinking and consciousness. If such individuals will not be enlightened they will keep doing gender for rest of their life.
According to my understanding your interpretations give you perceptions and your perceptions give you interpretations and this cycle goes on and on. That’s how you remain in the vicious-cycle of unending interpretations and perceptions; therefore, to gain enlightenment one should be master of ignoring distraction thoughts. When you learn the art of ignoring things your ignorance will be lessen and your will move towards enlightenment.