Distances of the bulge globular clusters Terzan 5, Liller 1, UKS 1, and Terzan 4 based on HST NICMOS photometry