You can use 'Esri.ArcGISRuntime.Geometry.GeometryEngine.Distance'
If one of your inputs is a point, you can also use 'Esri.ArcGISRuntime.Geometry.GeometryEngine.NearestCoordinate' to get the nearest location on another geometry, then measure the distance between those.