I did the same thing - bought both M1014 and M4 and swapped the recoil tubes. I used a Wagner heat gun. The first one took a while; for the second one I used the concentrator that came with the heat gun (basically a nozzle that necks down the hot air flow) and it took significantly less time.)
My only challenge is now I want to keep both. I like the variety (stocks, chokes, charging handles) and both run great.
Picture below was before the tube swap.