Hi. It seems to me that ἐκεῖνος refers back to ὁ παράκλητος, and this apposition is just another name for this advocate.rarely does ἐκεῖνος refer forward (Smyth 1257). I think though that there should be an agreement in gender.

But the Comforter, which is the Holy Ghost, whom the Father will sendin my name, he shall teach you all things, and bring all things toyour remembrance, whatsoever I have said unto you. [King James Bible]

Notice that the apposition τὸ πνεῦμα τὸ ἅγιον is neuter and the relative clause begins with a neuter relative pronoun,but the following ἐκεῖνος does not refer to τὸ πνεῦμα τὸ ἅγιον but to ὁ παράκλητος. I'm pretty sure that if it were,it would have been ἐκεῖνο.

ἐκεῖνος agrees with ὁ δὲ παράκλητος. Consider the noun πνεῦμα and it's relative clause in apposition to παρακλητος. The gender of two nouns πνευμα and παρακλητος are set - they can not be changed. So when one noun stands in apposition, is does not have to agree in gender. Τhe same holds true for predicate adjectives and predicate nominatives. e.g. ὁ παῖς ἦν τέκνον. 'the boy/servant' was a child."