I feel like one of the problems is that the Ranger doesn't have anything that is both distinctive and thematic at the same time. A lot of their abilities are highly situational and DM-dependent, and they excel in a pillar of the game (Exploration) that is rarely the focal point. If you don't have a ranger, most DMs gloss over travel. If you do have one and make travel a focus, many of the players other than the ranger are bored. This is bad design. So how do you fix that by designing rangers that are relevant?
First, you have to give the ranger a niche. So what should that niche be? Fighters have the weapons master covered, Rogues are the sneaky skill monkey, and bards are the Jack of All Trades class. So whither to slot the ranger?
1. IMO, Rangers should be the "alert" class - the one that's good for not getting surprised or ambushed. The Rogue may be the best "sneaker/ambusher" in the game, but in order to counter that, what you want is a Ranger.
2. Give Rangers as a class should fairly early on be some of the best in the game (Expertise) with the skills Animal Handling, Medicine, Nature, and Survival, and they should gain proficiency with the Herbalism kit the way Rogues get Thieves' tools. Because they just aren't Rangers without being the best at those things.
3. Combat skills close adjacent to those of fighters, with some kind of encouragement to being a highly mobile skirmisher class. I'd rather see something like the 3.5 Scout's "ambush damage" than Hunter's Mark. Faramir's men are really good at laying an ambush for the Southrons, and rangers as ambushers also fits both the Dunedain and the rangers set up by Robert Rogers in the early days of America.
That, to me, reads "Ranger." I don't totally object to spellcasting, but it should, IMO, be an optional part of the class (with some cool thematic spells), as opposed to a key one. Off the top of my head, you'd want subclasses like this:
Hunter: Specialist monster slayer - Aragorn, Faramir, Drizz't.
Beastmaster: Self-evident - Dar, Tarzan, Mowgli.
Warden (equivalent to Eldritch Knight): Spellcasting - Geralt of Rivia, Grey Wardens from Dragon Age.
Arcane Archer, Fey Wanderer, and Gloom Stalker could all be made to work as well.
Anyway, that'd be my pitch.