Worth repairing the Expedition, assuming low mileage and decent body? Absolutely. Worth paying $6000 for a remanufactured engine? No way!
Even assuming the diagnosis of a failed head gasket or even a cracked cylinder head is correct, you should be able to have this repaired for a LOT less than $6000.
Assuming the heads are ok, it should be possible to have the head gaskets and timing chain set replaced (together with all necessary incidental parts, and having the heads cleaned up by a machine shop) for around $2000, maybe a little more. It should also be possible to have a decent used motor installed for around $2500. Perhaps you need to shop around and look for a better deal.
Also, if you live in an area where annual emissions tests are not required, as long as the engine does not overheat, you could simply ignore the Check Engine light and drive it until it won’t run well enough anymore. Plenty of people do exactly that.