its not very likely John had those doubts. John was the one that baptized Jesus and heard the Most High call out from the heavens telling them exactly who Jesus was. people like John would never 2nd guess the Almighty not to mention the Lord was Johns life, he didnt have a wife, family, job, house, car, etc, living for the Lord was all he did. he lived in the wilderness surviving on grasshoppers and eating wild honey so i cant see how a little jail time would have overwhelmed this guy.
what John said in prison IMO had nothing to do with Jesus not being the Christ but had to do with a 2nd messiah that some believed would come with Jesus. it was an idea of the Essenes which many believed John was a member of if not their leader. Jesus answers John with a list of signs concerning the blind, lame, lepers, deaf, dead and poor. many think this is a reference to Isiah passages that mention poor, blind and deaf, however in the Essene theology writing concerning the Messiah they mention blind, lame, lepers, dead and poor with part of the scroll missing which more than likely would have mentioned the deaf which would have synced ever sign with exactly what Jesus told John. these are also the ones that called themselves a new covenant community. where have i heard that before . .