I doubt John 4:24 means, have the right attitude and make sure it is according to the biblical doctrines I have laid out for worship in the books that the apostles will have written over the next thirty to fifty years. Spirit never means “disposition or attitude” in John unless this is the exception, it without fell refers to the Spirit. Truth does refer to God’s word–although it isn’t univocal, more so, God’s word is what is real, and Jesus speaks the words of his Father–(17:17) but is also refers …to Jesus (14:6; 8:31-32), and in the immediate context to genuinesss (4:23). How interpreters automatically jump to 17:17 (assuming that “your word” defines “truth,” meaning bible and make up a meaning for pneumatos, isnt persuasive to me.
More fitting to the context, of what is true, is the actual worshipper, since God seeks true worshippers. The discussion centers around where to worship in Jerusalem or Mount Gerizim, a time will come where worship is not marked off by holy spaces but by true worshippers. It was an experience that would come in the future, worshiping in Spirit is an eschatological experience that is inauguated through the cross and the gift not through a text (since they already had one).
What’s important about truth is that it linked with Spirit (likely an hendiadys) and in a stylistic way clarifying “Spirit of Truth” (14:17; 15:26; 16:13). Temples in Gerizim and Jerusalem are not made obsolete by the bible, they had that already; they are made obsolete by a temple of true worshippers in dwelt by the Spirit, who by him, offer up spiritual sacrifices; this agrees with not only Johnannine usage but Petrine and Pauline as well.
I find it difficult that pneumatos wouldn’t refer to the Spirit, since John is very much reserving pneumatos to refer to the eschatological outpouring of the Spirit in the community of faith. I essentially see Jesus, especially when noting the context, saying those who worship God must worship him “in the true Spirit/Spirit of truth, as opposed to being in Jerusalem or in Gerizim, that also helps me understand the puzzling expression “God is Spirit” what does that have to do with worshipping him in Spirit? Essentially, it seems to mean that true worship is done in the Spirit to a spiritual being. In the Messiah we don’t worship in the flesh but in the Spirit (Phil 3:1-3; Eph 6:18). Even if it referred to the human spirit the hendiadys wouldn’t be lost (by means of a true spirit which would clarify true worshippers). I don’t see this text as a launch pad to proof texting random verses about items of worship, that isn’t in the context…
Also, there are a number of ways one can clearly talk about worshipping with a disposition or right attitude. The LXX naturally expresses this with: en ole kardia mou (with all your heart) or doxa (praise) or even soul (psyche). To make the Joshua allusion (serve God with sincerity and truth; Jos 24) more apparent if it were one, he could have just slightly altered the quotation or quoted it all together λατρευσατε αυτω εν ευθυτητι και εν δικαιοσυνη, serve him with sincerity and justice, contrasted with serving idols like Abraham’s family…
John is selecting material about Jesus’ life that the other writers did not, in many ways he is still governing vocabulary. But let’s look at how Jesus used pneumatos John 3:5, 4:13-14 explained in 7:38-39, 6:63 a reference to the Spirit and then a reference to his words being spirit and life (obviously derivative from the Spirit), 14-16 is full of Holy Spirit references, and he ends with “receive the Spirit” (21:22-23).
All of these references support my interpretation. What I purposely left out, because it isn’t Jesus’ words but Johns, was 1:32-34, where john says Jesus “baptizes” present tense, in the Spirit instead of future tense (like Synoptics, his point is Jesus Baptizes in the Spirit customarily (gnomic present) as opposed to a future event. That sets the stage for how Pneunatos should be interpreted in John. 1:32-34 with 21:22-23, function as book ends to the narrative. It begins with creation and leads us through to new creation where Jesus breathes on the apostles like God breathed on Adam and empowers them to live as a new humanity, but if we don’t respect John’s portrayal we will miss it.