Confirming this part from experience. Cavern Pylons work anywhere underground, including the underworld, with enough NPCs no matter what other biomes it is. You just can't buy Cavern Pylons if it's also another Biome. You need to build a few houses somewhere else underground. (and maybe destroy them when you're done with them if you really don't want the temperary houses around after you're done with them) Also, Biome Pylons don't care about height as long as it's in the biome. There happens to be enough Sand around to count as a Desert, which is why a Desert Pylon is being sold and it would work from there.According to the wiki you don't need to meet those requirements to actually use the pylon though, it just needs to be in a non-surface area.
The thing is that other biome pylons (besides forest and I think cavern too) do work in the don't dig up surface (as long as you actually have said biome up there and there isn't enough evil biome nearby to prevent NPCs from living there. For example I've seen people use the mushroom pylon to teleport to the don't dig up surface.Other notes about Pylons and height in case it's useful and becacuse why not: The Forest Pylon is like the opposite of the Cavern Pylon. It works anywhere above ground, including Space, as long as there's no other biome. Also, the Don't Dig Up secret Seed also messes with how a few Pylons work. Most notably, the surface isn't Forest. It's Death. There's no Death Biome Pylon.
Not true. The Cavern Pylon works as long as it's undereground, but you can only buy a Cavern Pylon if there's no other biomes.You’re getting the Desert Pylon because there is sand above you. The Cavern Pylon only works in the underground area with no other biomes. Try removing the sand to make it just Cavern.