Different engine configurations require different coil pack arrangements to correctly fire the spark plugs in the proper sequence. Using an incompatible coil pack can cause significant problems.
Always use the coil pack specified for your new engine. The part number on the old and new engine's coil packs should match. If they don't, find the correct coil pack for your new engine. Checking a reputable parts supplier's website (like AutoZone, Advance Auto Parts, or a similar source) using your engine's year, make, and model will provide the correct part. Using the wrong part could be very costly in repairs down the line.