How unauthorized access is prevented in biometric identification systems
It's not the closest distance alone which lets you make a decision.
Given a pattern recognition (or object classification) system that's trained with N objects, then for a given test sample you will do the following:
Compute the metrics based on the error produced by the chosen features of the test sample and the database.
Then seek through the classes for which this error-metric is a minimum.
Then further check if this minimum error is acceptable (i.e., below a suitable threshold).
If yes, then you decide that you have identified the test sample.
Otherwise, you were not able to decide; a.k.a. unidentified access.