After battling Heatran in Pokémon Diamond (at Stark Mountain), your rival/friend (Barry) will be waiting for you in the Distortion World.
This occurs during the post-game event where you team up with Barry to investigate Stark Mountain. After Heatran is battled/caught, the Distortion World portal opens (connected to Giratina's realm), and Barry proceeds there ahead of you.
In Diamond, the Distortion World appearance is brief and narrative-focused. Ensure you've saved before the Heatran battle.