Defy The Stars by Claudia Gray

A determined young human soldier, driven by grief and duty, sets out to destroy Abel, a notorious sentient android blamed for a devastating attack, but when she finds him their confrontation turns into an uneasy alliance. Fleeing across space together, they uncover larger political and technological conspiracies and develop an unexpected emotional bond that forces both to question prejudice, free will, and what it truly means to be alive.

Purchase from Bookshop.org