The SRF04 unit sends back a pulse to the ATTiny. You have to measure the time of the pulse using interrupts or polling. The time of the pulse will be 58 us times the distance in cm.
Once you have that number, you can use the ATTiny to convert the number to a voltage using PWM.
There are lots of code examples of both these things on the Internet. Search for AVR interrupts, and for PWM. Stack Overflow is not meant to be a place to repeat the examples for everyone who posts a question. If you get some code almost working, you can come back here to post your code and ask why is doesn't work.