Generative AI is only a statistical algorithm, quite successful to generate pseudo-human phrases.
And, inverse, quite successful to scompose an input phrase in parts: verbs, nouns, etc. So primarily a powerful tool to create a natural language interface from human to computer, alternative to keyboard, mouse, et al.
Capital importance has the training data, as you surely know. If it's trained on thousands of Python programs and only dozens of Pascal programs, of course the results would be better for Python.
ChatGpt is a "showroom" AI model, trained on a very general and generic data sources. Typically Wikipedia, Github, and similar.
So, regarding computer languages, it's totally biased to some languages (same for human languages, it's totally biased to english).
Conclusion: if you train a GAI model on the right database, it could be a valid STATISTICAL tool also for producing a computer program. "Statistical" in the sense than it will answer quite well, on average, doing a certain number of test with the same question.
You can try to ask ChatGpt the same question, for example, 10 times, and observe the results. And try to ask to write Python code.