In CHAPTER 17, the Lord is in prayer before His Father, concerning Himself (vv.1-5), His disciples (vv. 6-19), and future believers in the Church Universal (vv. 20-26).
In CHAPTER 15 v. 18-CHAPTER 16 v. 33, the Lord is instructing His disciples concerning their relationship with the world, and concerning the ministry of the Holy Spirit.