Mako is right (as usual), what you changed would not affect the spark. But obviously something wiggled, or was bumped, or just happened to fail at that moment. And your original idle issue would not have been affected by the throttle position sensor (good or bad), which suggests that while you have the scanner you don't have the MEFI manual. Without a good understanding of how the system functions you are going to struggle (do an internet search to find a manual , they are out there for free and for pay). Sounds like you may have a connection problem (since it did run before). Or the crank sensor. Or your Cam Retard setting (changed by loosening the distributor and rotating) is way off, and if the bolt is not tight maybe moving farther off.
If you crank the engine after giving it a good shot of starter fluid, that will tell you for sure if there is any spark there. If it does not fire, check all connections and then start down the path laid out in the manual. Or start swapping likely suspects with the good engine. Also, even if the engine does not run, you can use the scanner so see if any codes have been thrown. For example if your crankshaft sensor is bad or disconnected your scanner will tell you that.
Good Luck,
CaboJohn