Constrained nonparametric estimation of input distance function