Welcome aboard
you cant dry it, even if you lived in the desert and use a heat gun. if it did dry, it would no longer be closed cell foam anyway and wouldnt float
to replace the foam, you remove the floor, dig out the bad foam and replace it, then rebuild the floor. you may have to uncap the boat.
most likely if the foam is wet, so are the stringers and the transom.
there are stickies at the top of the restoration forum. one is labeled DIY information. read link 14 in there, then 2, 3, 4a, and 4b