Hard telling just looking at the plug and receptacle exactly what they are for certain but I know it all comes down to the pin-out configuration. The pin-outs, that is the wires themselves, may be the same as far as function goes but they need to land at mating pins. Since the connectors are different, I would start by getting a mating plug or receptacle from a salvage yard and then rewire it using the wiring diagrams from both the '08 G35 and '09 G37 as your guide. The FSM for both shown in the links below may help you identify these wire junction parts and determine where the rewired part needs to have the wires land so that the pin-outs of both will match.
https://www.nicoclub.com/service-manual ... 009/PG.pdf
https://www.nicoclub.com/service-manual ... 008/PG.pdf