Disassemble your old freewheel and use calipers to measure total thickness of cog+spacer of each gear. Then take apart your new freewheel and grind the spacers on an angle-grinder or bench-grinder so that the cog+spacer is the same as the old one.
I've done this a hundred times on various odd-ball Suntour freewheels I had laying around to make them work with Shimano indexing. Even built 7 & 8-spd Suntour freewheels that works with Shimano systems. And even made an 8-spd Shimano Dura-ace freewheel.