how to Measure distance with photo transistor and led

How much distance?

Over a few millimeters, you could take photoresistor readings vs the actual distance and map them within the Arduino; knowing the light intensity will die off over distance. Of course this will only work in shade to dark area and over a few millimeters. Beyond that you will need to research how laser range finders work and what it would take to build one using and Arduino.