Salvaging a hard drive/memory from Samsung Galaxy S4
The storage is soldered to the smaller board shown in Step 13 of this teardown. The challenge with this is being able to salvage that part. You could attempt a transplant of that board into your new S4 and see what happens (this is the most realistic answer), but there is no guarantee that it is usable because of the possible damage from the water. 

The less realistic answer would be to remove the memory modules from each phone and swap them, but that requires very precise tools and a steady hand. Not recommended.