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'?

3 answers

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.