Finding geodesics with the Deep Ritz method