First off, there are far more than 2 Mystery Dungeon games. There's Red Team, and Blue Team. Explorers of Time, Explorers of Darkness, Explorers of Sky is another set. Then there was Gates to Infinity, and Super Mystery Dungeon in 2016. So at least 4 games (with different versions like Pokémon for Gens III and IV), and I'd argue the Mystery Dungeon for Gen VII is on its way, because there's been one each generation since Gen III, which is why I'm not ready to say this series is done yet.
Pokémon Ranger, on the other hand... yeah that's dead. The last game for that was either Gen IV or Gen V era (pretty sure it was Gen IV but I'm not sure). I think those are long gone, and we shouldn't expect to see any of those any time soon. I, personally, am fine with this because I never enjoyed the Ranger series like I did some of the earlier PMD games (Explorers of Sky was amazing).