what is its setting?
Initially, it was considered that the gospel was set in a  late 1st century Christian community excommunicated from the Jewish synagogue. However, there has been debates regarding this in recent times.
Gospel of John
For much of the 20th century scholars interpreted John within the paradigm of a Johannine community, meaning that the gospel sprang from a late 1st century Christian community excommunicated from the Jewish synagogue (probably meaning the Jewish community) on account of its belief in Jesus as the promised Jewish messiah. This interpretation, which saw the community as essentially sectarian and standing outside the mainstream of early Christianity, has been increasingly challenged in the first decades of the 21st century, and there is currently considerable debate over the social, religious and historical context of the gospel. 
how many chapters does the gospel of john have 21. what is its structure? It has four sections: A prologue, the "Book of Signs", the "book of glory", and a conclusion. The epilogue might not have been a part of the original text. is it reliable historically? According to historians it has some historical value. how is it connected to john the baptist? It is the fourth of the canonical gospels , compiled by John.
wiki:7674460
Gospel of John [SEP] Setting: the Johannine community debate
For much of the 20th century scholars interpreted John within the paradigm of a Johannine community, meaning that the gospel sprang from a late 1st century Christian community excommunicated from the Jewish synagogue (probably meaning the Jewish community) on account of its belief in Jesus as the promised Jewish messiah. This interpretation, which saw the community as essentially sectarian and standing outside the mainstream of early Christianity, has been increasingly challenged in the first decades of the 21st century, and there is currently considerable debate over the social, religious and historical context of the gospel. Nevertheless, the Johannine literature as a whole (made up of the gospel, the three Johannine epistles, and Revelation), reveals a community holding itself distinct from the Jewish culture from which it arose while cultivating an intense devotion to Jesus as the definitive revelation of a God with whom they were in close contact through the Paraclete.