Dear Fatemeh,
I agree that q_swl = TransMat^-1*q_cg, with the TransMat^-1 that you’ve shown. However, “q” in this equation is the RAO. I’m not sure why you are premultiplying some combination of inertias with TransMat^-1. Also, the inertias you list (taken from the following forum post I presume: Inertial Moments of OC3-Hywind Components - #2 by Jason.Jonkman) are the inertias about SWL, not about the CG.
Best regards,