"You are right when you say you have no husband. ..." (John 4:17-18)

"The fact is, you have had five husbands, and the man you now have is not your husband. What you have just said is quite true." (John 4:17-18)
Here Jesus is responding to the woman's answer:
“I have no husband,” she replied. (John 4:17)

Why is Jesus saying she has no husband?

Jesus is showing the woman that he has the ability to know her past. This is to show her that God has empowered Jesus. Jesus is bringing attention to the teachings that God has instructed him to teach. In order to do so, from time to time he illustrated some of the power God had given him.

This is evidenced by the fact that following Jesus' statement, the woman said:
“Sir,” the woman said, “I can see that you are a prophet." (John 4:19)
The ability to know that the woman had five previous husbands, and her current boyfriend is not her husband illustrates to the woman that Jesus has been given extraordinary power.

Does this mean Jesus is God?

Does knowing her boyfriend is not her husband mean that Jesus is the Supreme Being, as many sectarian teachers claim? If Jesus was God then who was he praying to:
"'Our Father in heaven, hallowed be Your name, Your kingdom come, Your will be done, on earth as it is in heaven." (Matthew 6:9-10)
Or when he prayed:
“My Father, if it is possible, may this cup be taken from me. Yet not as I will, but as you will.” (Matt. 26:39)
Prayers like these confirm that Jesus never taught that he was God. Therefore, we cannot accept that Jesus is God. Even when he said, "I and the Father are one," Jesus was clarifying that he was united with God: That Jesus had the same will as God. This is confirmed when Jesus stated that he was God's representative:
"For I have come down from heaven not to do my will but to do the will of Him who sent me." (John 6:38)
According to Jesus, doing God's will means serving God. It means lovingly wanting to please Him. That is the prime definition of a loving servant.

As we'll see in the next statement, Jesus' purpose for showing his abilities is in an attempt to bring the Samaritan woman back home to her loving relationship with God. This is the clear definition of "being saved."