The basic circuit you just built is a wonderful start. Now you'll interface a more complex device, a sonar sensor, with Raspberry Pi Zero. Here is a picture of the sonar sensor that you'll add:
The device is an HC-SR04 and they are available at most online electronics retailers. Now let's connect the device to Raspberry Pi Zero. In order to do this, first let's look at the layout of the GPIO pins on Raspberry Pi Zero:
You'll need to connect to the 5 volt connection of the Raspberry Pi Zero, pin 2. You also need to connect to the GND, which is pin 6 on Raspberry Pi. Pin 16 (GPIO 23) is used as an output trigger pin and pin 18 (GPIO 24) as an input to time the echo from the sonar sensor.
Now that you know the pins you have to connect to, you'll connect the sonar sensor. However, there is a problem, as you can't connect the 5-volt return from the sonar sensor directly to the Raspberry...