Hi Aryan,
Sorry for the delayed response.
Could you please specify what exact rangefinder you’re using? This might help to see if it’s possible to configure it on Navio2.
Some of our users tested Benewake TFmini connected via UART. You can take a look at Marc’s thread to learn more about it.