Ann Leckie’s Ancillary Justice plays with the concepts of gender and identity with the framework of a conventional space opera. The main character is an “ancillary” — essentially a human being who’s consciousness has been overridden an artificial intelligence. That intelligence once controlled an entire starship and dozens of such ancillaries, and over the course of the book we learn about the disaster that caused it to lose its space-based self and all of its bodies but one.
The collective intelligence turned individual once served the Radchaai, an ungendered human empire. As a result, ship has a difficult time following (and perhaps even understanding) the role of gender in the human societies it finds itself exiled to. The book was slow to get going, but the ship’s identity crisis became increasingly compelling as the story progressed.