My long experience is that Ranger is a popular class in D&D.
But the main people it's popular with are people new to D&D.
Not veterans. What you're describing only applies to veterans. People who already have their expectations precisely calibrated to D&D's peculiarities.
So what I've seen repeatedly is people read the Ranger description, which barely mentions magic (seriously, check it out), or have a Ranger described, and what they think is "I can be Katniss" or if they're older "I can be Aragorn!" (who is literally called a Ranger!), and the main thing they think they're getting is a "nature expert", who is at least pretty good with a bow.
And what I then have seen is that people who do keep playing, don't usually play Rangers much, because for it's just a disappointing class that isn't actually that good at "nature stuff" (a Druid or even a Wizard often wildly outperforms it in "nature stuff"), and when veterans do play Rangers, it's often exploit some peculiar mechanic, and often a multiclass thing rather than a single class.
It's not like Cleric, where Cleric has become its own whole thing.