Quite simply put sex refers to the biological orientation of the individuals reproduction organ while may refer to the mental disposition of the person as in the behavioural, mental and physical aspects of the individual. In sociology 'sex' refers to nature while 'gender' refers to nurture.
So if you say your Gender in undetermined but your Sex is actually female then you could simply mean your not that feminine. Often times the two are confused because there is very little difference between them.
Both are words which can be used for same as well as different meaning