Distance functions and the metrization problem