I'm guessing here, but maybe you see these configuration languages as templates? However a configuration language is much more than that.
For example, jsonnet lets you combine objects and override deeply nested fields [1]. I'm not sure how practical it would be to achieve the same result with a general purpose language.
1: https://jsonnet.org/learning/tutorial.html#oo