Lots of opinions, and we don't know a thing about this Jeep, other than it's a CJ and you have an HEI.
What engine? What brand HEI? Care to share?
There was a problem awhile back with aftermarket HEI's, where they came with a gear that was hardened...too hard. And it ate up the gears on the cam.
It is possible you got one that was still on the shelf with the bad gears. Most of them have filtered through the system by now.
So IF that is what happened to yours, then you'd need to pull the cam. Then put the correct gear on the distributor so it won't do it again. No need to change it, the HEI is a great unit, used on millions of vehicles.
What is fishy is your statement
The jeep was at a mechanic not to long ago and I think they replaced the distributor. But I don't think that the gear is the right one for the AMC engine. Backwards.
You THINK they replaced the distributor? So did they, or didn't they? If they did, then THEY are responsible for your cam gear, and I'd be taking it straight to them.
And I'd inform them about the gear issues and to make sure whatever unit they use has the correct gear. I believe you can still get AMC factory gears at the dealer, plus there are a few aftermarket places that sell them, too.
Plus, find out exactly what brand they used, might be some recourse there, too.