Heatran
Heatran spawns in his own exclusive structure, the Stark Mountain. This can be found in the Nether Wastes Biome.
Locate Structure Command
/locate structure legendarymonuments:stark_mountainHow to Obtain
Materials Checklist
First, you need to find his structure. You can do so by using the radar with an empty map in a Nether Cartography Table or by just looking around Nether Wastes

This is what the Stark Mountain will look like in the nether and on the minimap.
We need to acquire a Magma Stone, and to do so requires beating 2 trainers. It's a bit of a maze inside so good luck! Try using the minimap to help you.
Trainer #1: Buck. This trainer will drop a Heat Fragment. Hold onto this.
Trainer #2: Charon. This trainer will drop a Heat Splinter. Hold onto this.
Now you can combine the two to make a Magmatic Cluster.

Find the Stark Forge, and put the Cluster in the top slot, and put a lava bucket as the fuel. Only a lava bucket will be accepted here.
There are some areas that are good to visit and loot before leaving.
Room #1: Lots of gold and a keystone ore. Can be found by going down a set of stairs and essentially walking in a spiral.

At the end you will find this entrance. Dig through 3 layers and find the room.
Room #2: Not really a room, but still good to loot. Contains a mega stone and 2 gimmighouls.
After enough searching, you will find the altar room. Use the Magma Stone on the Heatran Altar to summon Heatran.