Time length of signal for a digital pin to capture it?

You would have to not attempt to call digitalRead() in the ISR - just the fact the ISR was called is all
you need.

Don't set a variable in the ISR and clear it in loop(), that can lose pulses. Increment a variable in
the ISR and check if it has changed in the main program. You have to be aware than bytes larger
than one byte are not atomically accessed in an 8-bit microcontroller - there are ways round this
such as briefly disabling interrupts around accessing them.

I assume you tried disconnecting the sensor from pin 21 and manually taking pin 21 high and low with a test lead just to be sure your code is correct?

Do you have any means of measuring the voltage of the pulse?