If you want digital output that will tell you if there is a wall facing the sensor or not there are a lot of options.
If you want sensors which tell you if there is a wall facing the sensor or not and in addition to that the distance between the sensor and the wall you have fewer options.
You can use Sharp IR sensors to get range but they are expensive and their reaction time is slow(around 40 ms).
You can can use sonar sensors, but you need to find one with a narrow beam angle. They are also expensive and hard to get.
The best option is to use IR+photodiode sensors. There is an article in the the sensors section of SOR about these sensors.