Which sensor should I use to recognize just humans? (not all of the obstacles)
Afaik, infrared sensors are used for this, they also work in the dark.
When searching for human sensors, I also came for example to this sensor:
AK9750 Human Detection IR Sensor Module. This sensor has a range of 2-3 meters which should be sufficient for social distancing measurements. Probably there are more similar sensors.