You can use upgrades like Night Elf Longbows or Rifleman Long Rifles to increase range, and set the upgrade level via triggers (Player - Set Current Research Level). However, I think that you cannot reverse this effect, and only increase the range.
Alternatively you can use a morph spell (like Druid of the Claws' Bear Form), and give the unit you are morphing into the same stats, model and abilitys, just less/more range.