The YJ's are notorious for the two-piece rear-main seal leaking. Even though it "looks" to be the oil pan.
Otherwise, check your bolt torque, and mark where the leak is coming from, and make sure you scrape off all the junk where the pan meets the block. Both surfaces should be super clean. A gasket scraper or similar device will scrape off the goop, then try again?
Took me three tries to get my old YJ's oil pan to seal. Don't feel bad!