I would start but commenting-out your Blynk.logEvent line of code, otherwise you will quickly exceed the limit of 100 events per 24 hour period.
I’d also suggest disconnecting your buzzer, as this may be interfering with your ultrasonic sensor.
I’d then add a serial print line to show what raw value you are getting for your duration
value and see how/when this changes.
Pete.