Something I haven't seen asked... Is the 98 240 going to be your only car after you sell the Cobalt? Keep in mind that with either of the swaps you mentioned, your car will be down for weeks, literally, especially if you've never done one before. You will absolutely need to purchase another daily driver, unless, say, you're a teenager and your parents are paying for room, board, parts, and letting you drive an extra car they might have. It's awesome you have the ambition that you have for the 240, but stay as realistic as possible. The WORST thing is to run out of money halfway through the project, stuck with an empty engine bay, half the parts you need for the swap, and a slow KA motor that you REALLY don't want to put back in but find out that life says you have to.
Also, with crossbrand swaps like the LS1, you're talking custom -everything- from the differential input flange forward. Driveshaft, transmission, transmission mating to engine, motor mounts, interior shifter fit, and on and on and on. LS1 motors are reliable and torquey and fun, but if you're trying to pay absolute bottom dollar, you will most likely be getting one from a 13-year-old Camaro which will have garbage compression and most likely require a teardown and buildup with new stock parts. Theres another big chunk of change and time.
And for my personal $.02, I have no awe or respect for a small car that has a huge motor but looks like crap. Please make sure you have enough money to polish everything up when you're done, INCLUDING the motor and engine bay! What good is having an LS1 in your 240 if you can't show off your work? If you finish an LS1 swap, I would love to admire it! But if it's an eyesore when you're done, I won't give it a second glance.
Good luck!