Same problem. I highly doubt someone could machine one that had the exact thread start that would allow the indexing pin in the extension to line up with the gas port. There is a very slight chance that if you could find a dealer who had a number of these extensions that you could find one that would properly index, but you could go through MANY of them if/before you ever found one that properly indexed.
Doing what I describe next involves WAY more work than it is really worth, but here goes:
IMO, if you REALLY want this, you buy a new M4 extension and replace your old with the new. Then you weld shut your old gas port. While your are welding here, you might as well weld the old taper pin slots because you will need new ones, as your FSB will now sit at a different spot and new ones will need to be drilled & reamed. Then you machine the gas block surface back to true, then drill your new gas port properly indexed to the indexing pin on your barrel extension and properly spaced in relation to the gas block area. Next you need to line up your FSB, properly indexed to the barrel and drill new taper pin slots and taper ream them.
There are other methods of abandoning gas ports and filling old taper pin slots that require less heat and I would likely use these methods if I HAD to go through this process. Being the ultimate lazy person that I am, I would just buy a barrel with an M4 extension already installed. A machine shop may charge you a signigicant part of a new barrel cost to machine an extension for you, as there are many cuts involved and the hours will add up quickly.
Good luck with your search.