That electronic part is your ignition coil. I wouldnt worry about working with it. Just make sure all your plug wires go on the correct way. The cap only fits one way, it has a plastic notch that fits in the distributor, just line them up.
Dry the inside of the cap with a clean towel/rag. You should cover the distributor with a plastic bad next time you wash engine.