If you put the cam in correctly then I think your distributor is off a tooth, making your timing way off. Have you checked the timing? Put #1 at TDC. Make sure it's on the compression stroke. See where the rotor is pointing. I wouldn't fire it up to check the timing until you do that.
I'd also recheck the plug wires once more. Maybe one is swapped. The backfire makes me think it has something to do with ignition.