Do "that" and "it" refer to different things in this sentence?

Solution 1:

Past answer: deleted.

EDIT: Sorry for my mistake, I didn't notice it. My fault.

Reading it again, they both refer to the same thing but the first part instead, as in the fact that "he likes going there".

But your question was if "that" and "it" mean different things. They mean the same here, but the former is less ambiguous probably because it is a deixis.

"It" is still valid anyway, and in this case they are interchangeable.

Anyway, they refer to the predicate in the first sentence "he likes...", not to the action itself, because in that case, you'd say something different and more complex.