Of course if you have cards to buy a settlement you can buy a road, but I want to buy a settlement first in case my cards get stolen by another player. Can I buy the settlement first and not place it anywhere until I have a road network that would allow me to place it in accordance to the distance rule?
No, you may not.
As per the rulebook, under "Build" (on page 4) it says:
Take the appropriate number of roads, settlements, and/or cities from your supply and place them on the game board.
An explicit part of the building process is putting the built items onto the board, so no, you can't buy it and place it later.
The rules never talk about buying a settlement, they always talk about building a settlement, and there is no mention of being able to hold a settlement in reserve after paying for it. On the basis that the rules tell you specifically what you can do, then when you build a settlement you must place it on the board.