Rangers wasn't ever bad in 5e.
No, the ranger does in fact, suck. It's hidden by the fact that 5E is easy mode in difficulty with most monsters being a pathetic bag of hit points, an AC of 8+1d6 and a wimpy melee attack. But they are definitely underpowered, considering their nearest analogue, the paladin, is so far over them its a joke. They have some near useless ribbon features, the paladin gets about as many bonus spells from their oath as rangers get to even know (on top of knowing their entire list), and their action economy is pure dookie. Hunter's mark conflicts with dual wielding (which is borked balance wise in it own way), they need to spend an action to have their pet do anything (a paladin's summoned steed gets to act for free, and isnt even a class defining feature!). Their supposed exploration features are a joke compared to what a druid could do. Read Find the Path.
Basically they're a crap druid who traded away most of their spellcasting, wild shape, and a ton of other features for a second bow shot and an extra hit point. There is a reason they rank last in satisfaction surveys and we've seen WOTC try and remake the class multiple times.