Sounds like you aren't getting spark at the right time.
When mine did that the distributor drive gear on the camshaft was worn out. I would pull the distributor cap and crank the engine. Make sure the rotor spins consistently. If it gets stuck in one spot the drive gear is shot.
It could also be something wrong with the timing set or the bolt holding the distributor down could have loosened and allowed the distributor to turn
77 CJ-7- AMC 360, Edelbrock cam, MC2100, Fenderwells, CJ T18/D20, Chevy D44/EB 9" rear, Trutrac f/r, 4.11, SOA, 1.25 lift shackles, 35x12.50 BFG KM2s, Shackle Reversal