Ultrasound distance measurement is known for many years now. Long time ago we had to assemble ultrasound receiver and transmitter on our own providing that you had a luck to buy receiver and transmitter units at local shop. In those days there were no ebay...
Nowadays times are different, one can buy ultrasound components easy, but it's even better to buy assembled module that includes transmitter and receiver on one board. Such a module can be connected to a microcontroller and distance measurement can begin.