The Deluge was localized, it was not universal. If you look at the KJV Genesis 7:4; the word "earth" is translated from the Hebrew word adamah. You can find this in 'Strong's Concordance' #127, the hebrew word most used for the earth is erets and there is a different meaning here and erets has a number of meanings that always must be considered in context, but the Scripture from which the KJV is translated uses the Hebrew word adamah:- soil (from its gen. redness):-country, earth, ground, husband {man} (-ry), land. The root word is actually "Adam".
We know from not only Bible chronology but geological surveys and ancient myth that the Deluge or the Flood all though very vast did not cover the entire world nor did it kill all lving beings on the Earth itself. And if we study what Genesis says the Bible confirms this by using a word that is taken to mean 'a land of red soil, country faming land, dry ground. the word adamah does not mean the entire formations of all the Earth itself, does not mean, seas, or mountains, or lakes, or swamplands or even forests or deserts! the word and considering the contexts means dry farming land, and even more specifically red soil! So the Word is very specific that it is defining a certain area of earth.
Again it is a deliberate mistranslation on the behalf of the KJV writers and that is why a student of the Bible needs to read several translations and be able to understand both Hebrew and Greek definitions, in this case the Greek is the same as the Hebrew, many English versions however for various reasons have mistranslated this word which has sown confusion.