1. It is 10km away from this island to that island.

2. It is 10km from this island to that island.
----------------------------
Are both okay? Do we have to use 'away' or not? Is 'It' refers to 'the distance'?

Second one makes sense, first does not. I think it is better to use "the distance" instead of "it" as "it" is indefinite.

I disagree with Brea to an extent. "It" does refer to the distance and is perfectly acceptable. She's right that #2 is better than #1. Using "away" is redundant, although not incorrect. It's just an extra word.

I disagree with Reed, to an extent.

"This island is 10 km away from that island"

is common usage, while #1 seems to say that "it" is 10 km away. Not so. I'd say that you'll never hear a native English speaker use #1's syntax.

Both sentences are correct and convey the same meaning. In both sentences, "It" refers to the distance between the two islands.

The use of "away" in the first sentence is optional. Including "away" emphasizes the physical separation between the islands, indicating that they are at a distance from each other. However, in the second sentence, it is also clear that there is a distance between the islands, even without explicitly mentioning "away."

So, whether to include "away" or not depends on the emphasis you want to place on the separation between the islands.