How to change a unit type?

how do you change a unit type?
for example i want to make ottomans jans same as handcannon so they no longer take extra 50% ranged damage