I am looking for the name of a book I read, but I forgot the name of it. A retired, deactivated, dying super soldier is attacked in a space ship at the start of the book and he goes into a trance and all his super soldier features are turned back on while he changes into a female. She then goes on to become the head of I believe it was a Japanese family and fight to save the planet she is on in mechs.
Sounds like Into the Fire Once More: Book 1 of Death's Own Daughter (2015) by Jessie Wolf, Donald J. Kaufman SR. (Editor), HoneysuckleP (Editor).
At 97 James J. Owens thought he would take one last trip to pay his respects to fallen comrades. However fate had other plans. His return trip to the planet of Hades in the Death Gates System was to be his final farewell. At ninety seven, his doctors had told him his chances of surviving the trip were small. This did not deter him in the slightest. It would be his last great adventure.
The blurb for the second book, Out of the Ashes, states the transformation more explicitly:
James J Owens First High Lord of the Death Dealers has gone through a truly life changing experience, from a 97 year old man to a teenage girl.