The G series was not produced until late 45 or early 46, because the planes that used it weren't being produced. It was however fully developed and ready for production. The twin Mustang was originally supposed to have used the Merlin, but when the war ended, so did the cheap license to produce the Packard version of the Merlin. So the production of the G6 series was cranked up.
It is true, the F series, namely the 15/17/30 models, used the majority of the features of the G6. The difference was the supercharger. It was felt the P-38 didn't need the new trick supercharger, since it had a turbocharger. However, the new supercharger would have allowed the P-38 more power, and allowed it to maintain sea level power to well over 35K.
The reason that the new supercharger didn't seem to be such a big deal anyway is that until mid 43 or so, the USAAC didn't seem to grasp the need for very high altitude performance. Too late they realized that performance above 20K was at least as important as below.
A P-40, or a P-39 for that matter, with over 500 more HP at 25K, would have been much more valuable, especially to the pilot, than what was actually produced. The USAAC and the War Production Board proved to be far more short sighted and politically/profit motivated than was good for the guys doing the fighting. Regardless of whether some planes were being "phased out", they were still being produced and sent into combat. They should have been produced with the best possible engines and systems, especially when it wouldn't cost much more, and wouldn't slow production. The G6 series could have been phased in without much if any production delay.
The situation was somewhat similar to the idiots who decided that it would be much faster and cheaper to make the first run of M-16 rifles without a chrome lined barrel, and to get the ammunition made with cheaper but dirtier powder. They shot themselves in the foot there too. They sent men into combat with far less useful and effective weapons than could easily have been provided. One need look no further than the Sherman tank in World War II. Generals running armored units as far back as 41-42 knew that the Sherman was not enough tank, and said so loudly. Not nearly enough. And yet it was 1945 before the Pershing saw any real service, if then. It is inexcusable to send men into combat with cheap ineffective weapons knowing that they could and should easily be equipped with better weapons.
The point is, it should be noted that despite the reputation today of having the finest and most technologically advanced weapons and systems, in the past the U.S. was known as much or more for expediency and ineffectiveness for the sake of volume and profit.