True strike works with ranged attacks.
Grab a light crossbow and you got 1d8+Int at 80', with 2 damage types to pick from including radiant which is probably the best. It's the best pure damage cantrip.
Also note you can't swap weapons easily without the Attack action.
The spell is labeled melee spell attack, not ranged. It hasn't ever come up so I've never had to make a final ruling since the text doesn't clarify.
IMO, just don't deal damage with out of turn movement. (I.e. no readying to dash, or monk dragging you around).
That works too.