In answer to your question I have taken some of the arguments from Ryrie’s Basic Theology and added a few comments with a few more verses as well in some places. I would strongly recommend this excellent Theology for its soundness and simplicity.
The church did not exist in Old Testament times but was constituted on the Day of Pentecost (arguments to support the day of Pentecost will be given below). It is distinct to this present time period. Several lines of evidence support this conclusion.
(1) Our Lord said: “I will build My church” (Matt. 16:18). He did not say that He would continue to add to something already in existence, but that He would do something not yet begun.
(2) The church could have no functioning Head until after the resurrection of Christ; therefore, it could not exist until some time after He rose from the dead (Eph. 1:20-23—note how these verses connect His resurrection, ascension, and session to His headship over the church).
(3) The church could not have been an operating entity with functioning spiritual gifts until after Christ’s ascension. This is the clear implication of Eph. 4:7-12.
By a comparison of a number of passages, it seems clear that Pentecost marked the beginning of the church as a functioning body (the body of Christ) by the outpouring of the Spirit on that day. Note the following arguments:
(1) Before His ascension the Lord promised that the disciples would be baptized with the Holy Spirit soon (Acts 1:5).
(2) Though the word “baptism” does not appear in the account of Pentecost in chapter 2, it is quite clear from 11:15-16 that the baptism occurred for the first time on that day. Note carefully Peter’s argument here. In verse 15 he equated the indwelling of the Spirit in Acts 10:44 on the Gentile believers there with the coming of the Spirit and His indwelling in Acts 2. Then in verse 16, he equated all of this with the Lord’s promise of the baptizing of the Spirit in Acts 1:5 which shows these were one and the same, i.e., the baptizing of the Spirit. But what exactly is that?
(3) According to Paul in 1 Corinthians 12:13, Spirit baptism is a special work of the Spirit that places people (believers) in the body of Christ. So what is the body of Christ? The body of Christ is the church according to Ephesians 1:22-23. Thus, the church, the body, began when those first individuals were baptized by the Spirit which began the process of placing believers into the Body whenever any one believes in Christ. This process began at Pentecost.
Several other things occurred on the Day of Pentecost. The disciples were filled with the Spirit (Acts 2:4). Three thousand were baptized with water (v. 41). The visible church began that day (vv. 42-47).
In addition to baptizing those who believe into the body, the Spirit also indwells individual Christians (1 Cor. 6:19), local churches (3:16), and the body of Christ (Eph. 2:22). The Spirit also empowers, leads, comforts, and gives gifts to the church (Acts 1:8; 9:31; 1 Cor. 12:3). In a very real sense, the Spirit is the energizing life and power of the church.
So, what about the John 20:22 passage?
(1) This may have been a temporary indwelling until Pentecost similar to the indwelling of the Spirit in OT times as with Saul and David, an indwelling that could be removed as it was with Saul (cf. also Ps. 51:10-11 and Luke 11:13). David prayed that the HS might not be taken from Him, a prayer we can’t pray today since Spirit is given to us permanently as a seal unto the day of redemption (cf. Eph. 1:13-14; 4:30; see also John 14:16). In Luke 11:13 the Lord told the disciples they could at that time ask for the indwelling of the Spirit. They evidently did not and so, until Pentecost, He gave them the Spirit as a temporary enabling. At Pentecost, when the church began, the Spirit’s indwelling became permanent.
(2) On the other hand, some believe that this act of breathing on them was a kind of prophecy or a symbolic act in anticipation of the Spirit’s ultimate fulfillment of Ezekiel 37. For the argument of this view, see the footnote in the NET Bible on John 20:22 on our web site.