Did you notice how carefully that statement in John 4:24 has been crafted, so that there would be no misunderstanding?
It does not say that "God is the Spirit" but rather "God is spirit" (as shown in the NASB and other translations with capitalization). This corresponds to the Greek: πνεῦμα ὁ θεός καὶ τοὺς προσκυνοῦντας αὐτὸν ἐν πνεύματι καὶ ἀληθείᾳ δεῖ προσκυνεῖν.
And this is true: God the Father is spirit and the Holy Spirit is also spirit (immaterial). But no one in their right mind will say that the Father is the Holy Spirit and the Holy Spirit is the Father. They are distinct as shown in Matthew 28:19.
You know that Matt 28:19b is not in any of the earliest scriptures texts? The original ones had only 'in Jesus' or 'in his name' as in Acts and other NT scripture.
And making a fuss about adding in a definite article or not, before 'Spirit' does not alter the fact that the Father God is THE SPIRIT for the purpose of understanding of the verse for PERSONAL impact, and SPIRIT for what the FATHER is composed of.
Here is an OT scripture that says the Father is (THE) SPIRIT..
Isaiah 63:10 (NASB) But they rebelled and grieved
His Holy Spirit; Therefore He (YHWH) turned Himself to become their enemy, He fought against them. Just a note: The Father HAS/IS THE HOLY SPIRIT in this Isaiah verse for emphasis. Definite article intended here.
The New Testament, also concurs this truth:
Romans 8:11 (NASB) But if the (THE) Spirit of Him who raised Jesus from the dead dwells in you, He who raised Christ Jesus from the dead will also give life to your mortal bodies through His Spirit who dwells in you.
Note: The Father is THE SPIRIT...and THE SPIRIT OF THE FATHER dwells in me in the form of Christ's Spirit, directly!