Any ways to create a distance in google sheet using array formula ???

I used this formula in google sheet,
=GOOGLEMAPS(B2,C2,“kilometers”)
it works, but how can I make this algorithm into an array formula?
image

I also tried another way like
=GOOGLEMAPS(B:B,C:C,“kilometers”)
but it only shows the first result to the other rows below

En la tablas de glide hay una función para determinar la distancia la has probado? Tal vez te funcione y en las tablas los cálculos son más rápidos

You can directly use the distance column in glide or you can hardcode the formula in all cells below
With if condition