Read this article, which details the reckoning archaeology has had to do when addressing the complex, non-binary nature of biological sex characteristics. Includes several case studies of ambiguous archaeological remains which have pushed scientists to reconsider preconceived notions of both gender and sex in prehistoric times.
Archaeology's Sexual Revolution
Male, female, transgender, and other circular symbols made of multi-colored bones