Melee or Ranged. A weapon is classified as either Melee or Ranged.
Trident is a Martial Melee Weapon, that has the Thrown property.
Thrown
If a weapon has the Thrown property, you can throw the weapon to make a ranged attack, and you can draw that weapon as part of the attack. If the weapon is a Melee weapon, use the same ability modifier for the attack and damage rolls that you use for a melee attack with that weapon.
If the Trident was a "Ranged" weapon, then everyone would need to use Dex to attack with it.
Exactly. "Range" (p.214) is a property some weapons have. Specifically, two kinds of weapons have the "range" property: Ranged weapons (which is a binary classification: weapons are either ranged or melee, p.213), and "thrown" weapons (which is a property some but not all melee weapons have, p.214).
By the rules, rogues cannot sneak attack with thrown melee weapons, unless they are also finesse weapons.
Do you have to stick to the rules? Of course not! You can do what you like.
What I like is character concepts. If I have a cool character concept that can be represented mechanically by fiddling with the rules, I simply fiddle with the rules, no qualms and no remorse. I've played plenty of brawler rogues who could sneak attack with unarmed strikes. Because it's cool. (And doesn't break anything. Fiddling with full casters might require more caution, but martials? Eh, it's fine.) I've multiclassed Monk and Rogue to end up with ninja, and applied sneak attack to all weapons a ninja would be expected to use. You can just as easily refluff things ("I'm throwing shuriken, but using dart stats"), but it doesn't matter how you get there. If it's cool, just
get there. Why shut down a character concept just because the rules didn't predict it? They can't predict everything, can they?
Well, YMMV, but that's how I see it. DMs don't have to make rules and rulings for the whole wide world. Nor are they publishing a game to a wide audience. They only need to cater to the needs and preferences of their players, their group (including themselves! the DM has to have a good time, too!). They're supposed to run the game, not design it.