If you can use the transfinite recursion theorem you stated, why not simply apply it to $F$, and then use an isomorphism between $X$ and some ordinal to transfer the function $G$ from $ON$ to $X$? It seems like you are trying to reprove the transfinite recursion theorem rather than just applying it.