Difference between heuristic-based searching and optimal path searching
Uniform Cost Search (UCS) does not have a heuristic value and doesn't rely on a heuristic function.  I suspect you're getting it confused with some other algorithm (e.g., A*).  In Uniform Cost Search, there's no heuristic: we know exactly what the distance from the starting point was, and we use that to determine which nodes to expand.