Magmar is one of the awkward ones in Diamond, because it is not simply sitting in a patch of grass waiting to be encountered.
The reliable route is Magby, its pre-evolution, which you then level up to evolve into Magmar. Failing that, trading is the other standard answer — a number of Sinnoh Pokémon were deliberately made version-exclusive or trade-dependent to push players toward each other.
Since availability has shifted across the various remakes and patches, it is worth checking a Diamond-specific source before you spend hours searching a route that has nothing on it.