I would not recommend to change the weapon type, if you want your unit to behave like a melee unit.
Weapon type affects a lot of things like vampiric aura, thorns aura, trueshot aura, spiked barricades, spiked carrapace, frost armor. Every ability the differentiates between melee and range will no longer work correctly. Your unit might even miss when attacking a unit on high ground.