NOTE: I am going to give an answer purely based on inspired scripture. The writings of the apostolic fathers or of any ante-Nicene fathers or early church fathers are NOT inspired; one cannot use them to "prove" their theologies. If one wants to prove whatever doctrine or theology they adhere to, they must do so using scripture alone. That's not to say they cannot mention the writings of the fathers; only that they can't take their writings as proof of their doctrine. So, if you notice in my answer a total absence of the writings of the ante-Nicene fathers and a very high presence of God-inspired scripture, you'll know why. ^_^
What Is A Spirit?
The only word translated as "spirit" in Hebrew is רוּחַ, pronounced ruach; it's the same word found in Ecclesiastes 12:7. It has many meanings; it does not exclusively refer to a "sentient, immaterial entity", e.g. God(John 4:24), angels(Hebrews 1:14), demons(Luke 4:33), etc.
Let's see some places where רוּחַ does NOT refer to a conscious spirit being.
Genesis 3:8 And they heard the sound of the Lord God walking in the garden in the cool[רוּחַ] of the day, and the man and his wife hid themselves from the presence of the Lord God among the trees of the garden.
Genesis 6:17 For behold, I will bring a flood of waters upon the earth to destroy all flesh in which is the breath[רוּחַ] of life under heaven. Everything that is on the earth shall die.
Genesis 7:15 They went into the ark with Noah, two and two of all flesh in which there was the breath[רוּחַ] of life.
Genesis 7:22 They went into the ark with Noah, two and two of all flesh in which there was the breath[רוּחַ] of life.
Genesis 8:1 But God remembered Noah and all the beasts and all the livestock that were with him in the ark. And God made a wind[רוּחַ] blow over the earth, and the waters subsided.
Exodus 10:19 And the Lord turned the wind into a very strong west wind[רוּחַ], which lifted the locusts and drove them into the Red Sea. Not a single locust was left in all the country of Egypt.
Exodus 15:8 At the blast[רוּחַ] of your nostrils the waters piled up; the floods stood up in a heap; the deeps congealed in the heart of the sea.
Numbers 5:14 and if the spirit[רוּחַ] of jealousy comes over him and he is jealous of his wife who has defiled herself, or if the spirit of jealousy comes over him and he is jealous of his wife, though she has not defiled herself,
1 Kings 10:5 the food of his table, the seating of his officials, and the attendance of his servants, their clothing, his cupbearers, and his burnt offerings that he offered at the house of the Lord, there was no more breath[רוּחַ] in her.
2 Chronicles 9:4 the food of his table, the seating of his officials, and the attendance of his servants, and their clothing, his cupbearers, and their clothing, and his burnt offerings that he offered at the house of the Lord, there was no more breath[רוּחַ] in her.
2 Chronicles 21:16 And the Lord stirred up against Jehoram the anger[רוּחַ] of the Philistines and of the Arabians who are near the Ethiopians.
Job 7:7 “Remember that my life is a breath[רוּחַ]; my eye will never again see good.
Job 41:16 One is so near to another that no air[רוּחַ] can come between them.
Psalm 33:6 By the word of the Lord the heavens were made, and by the breath[רוּחַ] of His mouth all their host.
Proverbs 16:32 He who is slow to anger is better than a warrior, and he who controls his temper[רוּחַ] is greater than one who captures a city.
Proverbs 25:28 A man without self-control[רוּחַ] is like a city broken into and left without walls.
Isaiah 33:11 You conceive chaff; you give birth to stubble; your breath[רוּחַ] is a fire that will consume you.
Jeremiah 14:6 The wild donkeys stand on the bare heights; they pant for air[רוּחַ] like jackals; their eyes fail because there is no vegetation.
As you can see, רוּחַ can take on various meanings; it would be erroneous to say that because Ecclesiastes says the רוּחַ returns to God, the author must be talking about an immaterial, conscious entity returning to God; "spirit", or רוּחַ, does not necessarily refer to a (sentient) spirit being. But how about the Greek equivalent of רוּחַ, which is πνεῦμα(pronounced pneuma)? Does πνεῦμα refer solely to conscious spirit entities? No, just as its Hebrew counterpart does not.
Matthew 5:3 “Blessed are the poor in spirit[πνεῦμα], for theirs is the kingdom of heaven.
Luke 1:80 And the child continued to grow and to become strong in spirit[πνεῦμα], and he lived in the deserts until the day of his public appearance to Israel.
John 3:8 “The wind[πνεῦμα] blows where it wishes and you hear the sound of it, but do not know where it comes from and where it is going; so is everyone who is born of the Spirit.”
John 11:33 When Jesus therefore saw her weeping, and the Jews who came with her also weeping, He was deeply moved in spirit[πνεῦμα] and was troubled,
Romans 11:8 as it is written, “God gave them a spirit[πνεῦμα] of stupor, eyes that would not see and ears that would not hear, down to this very day.”
Rom 12:11 Do not be slothful in zeal, be fervent in spirit[πνεῦμα], serve the Lord.
1 Corinthians 4:21 What do you wish? Shall I come to you with a rod, or with love in a spirit[πνεῦμα] of gentleness?
2 Corinthians 7:13 Therefore we are comforted. And besides our own comfort, we rejoiced still more at the joy of Titus, because his spirit[πνεῦμα] has been refreshed by you all.
Galatians 6:1 Brothers if anyone is caught in any transgression you who are spiritual should restore him in a spirit[πνεῦμα] of gentleness. Keep watch on yourself, lest you too be tempted.
Hebrews 1:7 Of the angels he says, “He makes his angels winds[πνεῦμα], and his ministers a flame of fire.”
James 2:26 For just as the body without the spirit[πνεῦμα] is dead, so also faith without works is dead.
1 Peter 3:4 but let your adorning be the hidden person of the heart with the imperishable beauty of a gentle and quiet spirit[πνεῦμα], which in God’s sight is very precious.
1 John 4:1-3; 6 Beloved do not believe every spirit[πνεῦμα], but test the spirits[πνεῦμα] to see whether they are from God, for many false prophets have gone out into the world. By this you know the Spirit of God: every spirit[πνεῦμα] that confesses that Jesus Christ has come in the flesh is from God, and every spirit[πνεῦμα] that does not confess Jesus is not from God. This is the spirit[πνεῦμα] of the antichrist, which you heard was coming and now is in the world already.; We are from God. Whoever knows God listens to us; whoever is not from God does not listen to us. By this we know the Spirit of truth and the spirit[πνεῦμα] of error.
Revelation 11:11 But after the three and a half days a breath[πνεῦμα] of life from God entered them, and they stood up on their feet, and great fear fell on those who saw them.
Revelation 13:15 And it was allowed to give breath[πνεῦμα] to the image of the beast, so that the image of the beast might even speak and might cause those who would not worship the image of the beast to be slain.
Clearly, πνεῦμα does not refer only to immaterial sentient entities; many times it refers to a state of mind, i.e. the mental disposition or mood/attitude of a person(or even of a thing, such as a statement[e.g. 1 John 4:1-3; 6]). Sometimes it refers to wind. And yet other times it refers to the breath that gives life to something, e.g. James 2:26 says that without the πνεῦμα, the body cannot live, in other words, the πνεῦμα gives life to the body(Revelation 11:11 is another example of πνεῦμα referring to the life-giving breath). Essentially, πνεῦμα can be used in reference to an animating force(of both living beings[e.g. James 2:26, Revelation 11:11] and things[such as the image of the beast in Revelation 13:15]). This is not unlike its Hebrew counterpart, רוּחַ, which refers to the vital life-breath of a living entity numerous times in the Tanakh. The main point is that neither the Hebrew(רוּחַ) nor Greek(πνεῦμα) words for "spirit" refer only to a conscious spirit entity; a reading of Ecclesiastes 12:7 that says that the conscious spirit being of a person lives on after death is not by any means necessitated.
Where Does The Spirit Go?
Unfortunately, not much is said about where the spirit(רוּחַ, πνεῦμα) goes after death in the Bible. But there is some that is said. I can think of four major passages. Let us analyze them...
Ecclesiastes 3:21 Who knows whether the spirit of man goes upward and the spirit of the beast goes down into the earth?
From the perspective of the author, "upwards" refers to only one place; Heaven. The Israelites thought Heaven was above the earth. This is incontrovertible.
Genesis 28:12 And he dreamed, and behold, there was a ladder set up on the earth, and the top of it reached to heaven. And behold, the angels of God were ascending and descending on it! (The ladder was ON the earth, and its TOP reached to Heaven, i.e. Heaven is above the earth.)
Genesis 49:25 by the God of your father who will help you, by the Almighty who will bless you with blessings of heaven above, blessings of the deep that crouches beneath, blessings of the breasts and of the womb. (Heaven above, not Heaven below. Heaven is what is upwards.)
Deuteronomy 4:39 know therefore today, and lay it to your heart, that the Lord is God in heaven above and on the earth beneath; there is no other. (Indeed, God is the Sovereign over the entire universe, over Heaven ABOVE and the earth below.)
Deuteronomy 30:12 It is not in heaven, that you should say, ‘Who will ascend to heaven for us and bring it to us, that we may hear it and do it?’ (Who will ascend to Heaven, not who will descend to Heaven. Once again, Heaven is depicted as upwards, not downwards.)
Psalm 14:2 The Lord looks down from heaven on the children of man, to see if there are any who understand, who seek after God. (God looks down from Heaven to see the children of man[who live on the earth], meaning that He is above the earth. Once again, Heaven is depicted as above the earth, not below it.)
Luke 24:51 While he blessed them, he parted from them and was carried up into heaven. (Jesus was carried UP into Heaven.)
John 20:17 Jesus said to her, “Do not cling to me, for I have not yet ascended to the Father; but go to my brothers and say to them, ‘I am ascending to my Father and your Father, to my God and your God.’” (Jesus had not yet gone UP to Heaven to be with God the Father. Once again, Heaven is above the earth.)
Acts 1:9-11 And when he had said these things, as they were looking on, he was lifted up, and a cloud took him out of their sight. 10 And while they were gazing into heaven as he went, behold, two men stood by them in white robes, 11 and said, “Men of Galilee, why do you stand looking into heaven? This Jesus, who was taken up from you into heaven, will come in the same way as you saw him go into heaven.” (Jesus ascended, not descended, into Heaven. Once more, Heaven is depicted as upwards in relation to the earth.)
This should be enough to convince you that, from an Israelite's perspective(and thus the perspective of the author of Ecclesiastes), "upwards"(in reference to location) refers to Heaven. When Ecclesiastes asks whether the spirit of man goes upwards, from his standpoint, "upwards" refers to Heaven, not Sheol. But perhaps there is a chance it refers to Sheol? After all, Sheol is also depicted as upwards, is it not? No, not at all. The exact opposite is true. Sheol is never once depicted as upwards, but countless times depicted as downward.
Genesis 37:35 All his sons and all his daughters rose up to comfort him, but he refused to be comforted and said, “No I shall go down to Sheol to my son, mourning.” Thus his father wept for him.
Genesis 44:29 If you take this one also from me, and harm happens to him, you will bring down my gray hairs in evil to Sheol.’
Num 16:30; 33 But if the Lord creates something new, and the ground opens its mouth and swallows them up with all that belongs to them, and they go down alive into Sheol, then you shall know that these men have despised the Lord.”; So they and all that belonged to them went down alive into Sheol, and the earth closed over them, and they perished from the midst of the assembly.
1 Kings 2:6 Act therefore according to your wisdom, but do not let his gray head go down to Sheol in peace.
Job 11:8 It is higher than heaven —what can you do? Deeper than Sheol—what can you know?
Job 21:13 They spend their days in prosperity, and in peace they go down to Sheol.
Isaiah 14:11 Your pomp is brought down to Sheol, the sound of your harps; maggots are laid as a bed beneath you, and worms are your covers.
I cannot stress how beyond inconceivable it is that when Ecclesiastes was questioning whether the spirit of man goes upwards, he was actually questioning whether the spirit of man goes to Sheol, which is explicitly depicted as being downwards! Now we move on to the next passage.
Ecclesiastes 12:7 and the dust returns to the earth as it was, and the spirit returns to God who gave it.
What does the word return mean? Return - to go back or come back again. (Merriam-Webster) So, Ecclesiastes is saying that the spirit goes back to God. Perhaps it means that the spirit goes back to Sheol, which is in the realm of God? But wait, there are several problems with that. The first one is that in order to return to Sheol, we would've had to be there in the first place. Whenever the Bible talks about Sheol, it talks about it like a place where the dead go; but under our interpretation, it would have to be a place where the unborn are? Remember, you can't return to a place you've never been to; that's nonsensical. Therefore, we must've been to Sheol before we died. Certainly, we haven't been to Sheol while alive, thus the only other period of time would be the time before we were born; in conclusion, Sheol is both the place of the unborn and the dead. It's already a huge problem that the Bible never once talks about Sheol being a place other than the place of the dead, but it becomes even more of a problem when we realize that Sheol is divided into two compartments, one for the bliss of the righteous and another for the torment of the unrighteous! But wait. How does God decide which compartment to put an unborn person in? The person is neither righteous nor unrighteous, as the person has not even been born yet! Well, maybe there's a third compartment in Sheol, one for the unborn!
I hope you think that this is all completely ridiculous. I'm running the interpretation that "the spirit returns to God" means "the spirit goes to Sheol" through a reductio ad absurdum. But as if that wasn't enough, there is yet another problem! It's that Sheol is never said to be "in the realm of God". If you want to check all 63 occurrences of שְׁאוֹל(Sheol) in the Tanakh to affirm that, be my guest. You won't find any that say that Sheol is "in the realm of God".
But if "the spirit returns to God" doesn't mean "the spirit goes to Sheol", whatever could it possibly mean? I have a suggestion; I think it means that the spirit returns to God(crazy, right?). Who would've ever thought of that? Hear me out though, please. My interpretation is that the רוּחַ goes back to the place it was in before God breathed it into us. What am I referring to?
Genesis 2:7 Then the LORD God formed man from the dust of the ground and breathed the breath of life into his nostrils, and the man became a living being.
Notice how God "breathed the breath of life"; our breath(our vital life-sustaining spirit) comes from God. Hence, when Ecclesiastes says that the spirit of man returns to God, it means that it goes back to being with Him, just as how it was with Him before He breathed it into us. It's the reverse process of God giving it to us; He takes it back! Wait, God takes our spirit? Is God ever said to take our spirit? Yes. The remaining two verses will affirm this.
Luke 23:46 Then Jesus, calling out with a loud voice, said, “Father, into your hands I commit my spirit!” And having said this he breathed his last.
Acts 7:55-59 But he, full of the Holy Spirit, gazed into heaven and saw the glory of God, and Jesus standing at the right hand of God. 56 And he said, “Behold, I see the heavens opened, and the Son of Man standing at the right hand of God.” 57 But they cried out with a loud voice and stopped their ears and rushed together at him. 58 Then they cast him out of the city and stoned him. And the witnesses laid down their garments at the feet of a young man named Saul. 59 And as they were stoning Stephen, he called out, “Lord Jesus, receive my spirit.”
Jesus expected God to take His spirit; Stephen expected Jesus to take his spirit. That's why both Jesus and Stephen gave their spirits up; they expected someone to receive them! Now, when Jesus gave up His spirit into the hands of His Father, where was He expecting His spirit to go? Into the hands of His Father! And where does God reside?
Psalm 11:4 The LORD is in his holy temple; the LORD’s throne is in heaven; his eyes see, his eyelids test the children of man.
Psalm 14:2 The LORD looks down from heaven on the children of man, to see if there are any who understand, who seek after God.
1 Kings 8:30 And listen to the plea of Your servant and of Your people Israel, when they pray toward this place; hear in heaven Your dwelling place; hear and forgive!
1 Kings 22:19 Micaiah continued, “Therefore hear the word of the LORD: I saw the LORD sitting on His throne, and all the host of heaven standing by Him on His right and on His left.
2 Chronicles 30:27 Then the priests and the Levites stood to bless the people, and God heard their voice, and their prayer came into His holy dwelling place in heaven.
Isaiah 63:15 Look down from heaven and see, from your holy and beautiful habitation. Where are your zeal and your might? The stirring of your inner parts and your compassion are held back from me.
Lamentations 3:41 We raise our heart and hands toward God in heaven;
Indisputably, God resides in Heaven. Thus, Jesus, committing His spirit to God, expected His spirit to go to Heaven with God(who unquestionably dwells there). Now, when Stephen gazed into Heaven and saw Jesus(Acts 7:55-56), and asked Him to receive His spirit(Acts 7:59), what did Stephen think was going to happen to his spirit? Well, that Jesus would receive it! And where was Jesus? Unequivocally in Heaven. So where did Stephen think his spirit was going? To be with Jesus in Heaven, not to Sheol.
Those are the four passages(i.e. Ecclesiastes 3:21, Ecclesiastes 12:7, Luke 23:46, Acts 7:55-59) that speak about where the spirit goes after the death of a person. NONE of them suggest Sheol; ALL of them suggest with God in Heaven. I hope that's apparent by now.
But hold your horses! Don't Isaiah 14:9 and 1 Peter 3:19 talk about the spirits of the dead being in Sheol/Hades? Let's read them;
Isaiah 14:9 Sheol beneath is stirred up to meet you when you come; it rouses the shades[רְפָאִים] to greet you, all who were leaders of the earth; it raises from their thrones all who were kings of the nations.
The word used there, רְפָאִים(Repha’im), is not the same word used for "spirit", which is רוּחַ(ruach). The word used in Ecclesiastes 12:7 is רוּחַ, which is an entirely different word than רְפָאִים. Never in the entire Bible is רוּחַ or πνεῦμα said to be in Sheol/Hades; Isaiah 14:9 is not an exception... Check out this answer here for an understanding of Isaiah 14:9.
Ok, but what about 1 Peter 3:19? Surely there the spirits of the dead are said to be in Sheol/Hades.
1 Peter 3:19 in which He also went and made proclamation to the spirits in prison,
The words "Hades" and "dead" seem to be missing from the text. Notice that the verse does not say, "in which He also went and made proclamation to the spirits of the dead imprisoned in Hades". If you want to interpret it as such, fine by me; but that is nothing more than unsubstantiated conjecture. Thus, 1 Peter 3:19 does NOT affirm that the spirits of the dead are in Sheol/Hades.
In conclusion, Ecclesiastes 12:7 is saying that the spirit(i.e. the vital breath that sustains a living person) of a human entity returns(i.e. goes back) to where it was before it was breathed into us(Genesis 2:7), i.e. with God(who dwells in Heaven). It is not saying that our spirits return to Sheol.
I hope this was of help. Have a wonderful day! :)