PHB p. 72 (and others)
Dueling
When you are wielding a melee weapon in one hand and no other weapons, you gain a +2 bonus to damage rolls with that weapon.
PHB p.147
Thrown. If a weapon has the thrown property, you can throw the weapon to make a ranged attack. If the weapon is a melee weapon ...
So a Handaxe is a simple melee weapon with the thrown property so, as written, it can benefit from Dueling whether used for a melee or ranged attack because it remains a melee weapon irrespective of how it is used.
Conversely, it cannot benefit from the Archery Fighting Style because it is never a ranged weapon even when making a ranged attack.
Where it gets really interesting is in the interaction with Two-Weapon Fighting (p.195)
When you take the Attack action and attack with a light melee weapon that you’re holding in one hand, you can use a bonus action to attack with a different light melee weapon that you’re holding in the other hand. You don’t add your ability modifier to the damage of the bonus attack, unless that modifier is negative.
If either weapon has the thrown property, you can throw the weapon, instead o f making a melee attack with it.
So, with 2 Handaxes and I throw the first, because it is a light weapon, I can use Two-Weapon Fighting to use the other (either for melee or ranged) and benefit from Dueling because I am now "wielding a melee weapon in one hand and no other weapons."
Am I reading this right?