Another interpretation: "for it was near" (Exodus 13:17). Near was the oath that Abraham our father swore to Abimelech, "now therefore swear to me here by God" (Genesis 21:23) and so forth, and his grandson was still alive. [Therefore Israel could not yet pass through the land of the Philistines, since the oath of nonaggression had not yet expired.]
Why the Near Road Was Closed and Abraham's Oath to Abimelech
Yalkut Shimoni on Torah 226:6
דָּבָר אַחֵר, כִּי קָרוֹב הוּא, קְרוֹבָה שְׁבֻעָה שֶׁנִּשְׁבַּע אַבְרָהָם אָבִינוּ לַאֲבִימֶלֶךְ, "וְעַתָּה הִשָּׁבְעָה לִי בֵּאלֹהִים הִנָּה" וְגוֹ' וַעֲדַיִן נְכֶדּוֹ קַיָּם.