When an old world is upgraded, the terrain blending can place structures in the wrong biome.
MC-241216 has a 1.17.1 world save "S3-1171.zip" (direct link) that exhibits this issue after upgrading. It generates a jungle temple in a swamp at -394 21. No jungle biome is found here after upgrading.
Linked issues
Attachments
Comments

Dupe of MC-241698