Greek, like the Romance languages deriving from Latin (Spanish, French, Italian, etc.), assigns a specific gender for every noun. Every object, animate or inanimate, is designated as either masculine, feminine or neuter. The gender is often unrelated to whether the item is indeed masculine or feminine.
For example, in French the word livre, meaning “book,” is of the masculine gender and is referred to by a pronoun equivalent to the English “he” or “him.” And in Spanish, mesa, or “table,” is in the feminine. Clearly, although these nouns have gender, their gender does not refer to actually being male or female. In the English language, in contrast, most nouns that do not refer to objects that are male or female are referred to in the neuter sense, with the pronoun “it.”
We might note that in the Hebrew language, in which the Old Testament was written, the word translated “spirit,” ruach, is referred to with feminine pronouns. But the Holy Spirit clearly is not female or a woman.
In Greek, both masculine and neuter words are used to refer to the Holy Spirit. The Greek word translated “Counselor,” “Helper,” “Comforter” and “Advocate” in John chapters 14 to 16 is parakletos, a masculine word in Greek and thus referred to in these chapters by Greek pronouns equivalent to the English “he,” “him,” “his,” “himself,” “who” and “whom.”
Because of the masculine gender of parakletos, these pronouns are grammatically correct in Greek. But to translate these into English as “he,” “him,” etc., is grammatically incorrect.
For example, you would never translate a particular French sentence into English as “I’m looking for my book so I can read him.” While this grammatical construction makes sense in the French language, it is wrong in English. In the same way, to suppose on this basis that the Holy Spirit is a person to be referred to as “he” or “him” is incorrect.
Only if the parakletos or helper were known to be a person could the use of a gender-inflected pronoun justifiably be used in English. And the term parakletos certainly can refer to a person—as it refers to Jesus Christ in 1 John 2:1 1 John 2:1My little children, these things write I to you, that you sin not. And if any man sin, we have an advocate with the Father, Jesus Christ the righteous:
American King James Version×. Yet the Holy Spirit is nowhere designated with personhood. So personal pronouns should not be substituted for it.
Furthermore, there is absolutely no theological or biblical justification for referring to the term “Holy Spirit” with masculine pronouns, even in Greek. The Greek word pneuma, translated “spirit” (but also translated “wind” and “breath” in the New Testament) is a grammatically neuter word. So, in the Greek language, pronouns equivalent to the English “it,” “its,” “itself,” “which” or “that” are properly used in referring to this word translated into English as “spirit.”
Yet when the King James or Authorized Version was produced (early in the 1600s), the doctrine of the Trinity had already been accepted for more than 1,000 years. So naturally the translators of that version, influenced by that belief, usually chose personal rather than neutral pronouns when referring to the Holy Spirit in English (see, for example, John 16:13-14 John 16:13-14  However, when he, the Spirit of truth, is come, he will guide you into all truth: for he shall not speak of himself; but whatever he shall hear, that shall he speak: and he will show you things to come.
 He shall glorify me: for he shall receive of mine, and shall show it to you.
American King James Version×; Romans 8:26 Romans 8:26Likewise the Spirit also helps our infirmities: for we know not what we should pray for as we ought: but the Spirit itself makes intercession for us with groanings which cannot be uttered.
American King James Version×).
However, this wasn’t always the case. Notice that in some passages in the King James Version the translators did use the proper neuter pronouns. For example, Romans 8:16 Romans 8:16The Spirit itself bears witness with our spirit, that we are the children of God:
American King James Version×says, “The Spirit itself [not himself] beareth witness with our spirit, that we are the children of God.” Similarly, Romans 8:26 Romans 8:26Likewise the Spirit also helps our infirmities: for we know not what we should pray for as we ought: but the Spirit itself makes intercession for us with groanings which cannot be uttered.
American King James Version×says “the Spirit itself [again, not himself] maketh intercession for us with groanings which cannot be uttered.” In these cases the translators correctly used neuter pronouns because the Greek word pneuma, translated “Spirit,” is neuter in gender.
Another example is Matthew 10:20 Matthew 10:20For it is not you that speak, but the Spirit of your Father which speaks in you.
American King James Version×, where Jesus says: “For it is not ye that speak, but the Spirit of your Father which [not who] speaketh in you.” Another is 1 Peter 1:11 1 Peter 1:11Searching what, or what manner of time the Spirit of Christ which was in them did signify, when it testified beforehand the sufferings of Christ, and the glory that should follow.
American King James Version×, which refers to “the Spirit of Christ which [again, not who] was in them.” The King James Version translators did use the proper neuter pronouns in these verses.
Regrettably, later English translators of the Bible have gone further than the King James translators in referring to the Holy Spirit with masculine rather than neuter pronouns. Thus the Holy Spirit is almost always referred to as “he” or “him” in the more modern versions. This reflects not linguistic accuracy, but the doctrinal bias or incorrect assumptions of Bible translators who wrongly believe the Holy Spirit is a person.