Her primary problem was her ignorance, which is exactly what Jesus addresses in John 4:10. Instead of answering her question, he points out the need for it to be reconfigured.
“If you knew the gift of God, and who it is that is saying to you...” Jesus says this to point out that she doesn’t know who he is. That's the most essential problem in the life of this Samaritan women, not her five failed marriages and the fact she's living with her boyfriend. She has no clue who it is that just asked her for a drink of water.
In the verses that follow, John shows us how this woman's interaction with Jesus leads her out of this ignorance.
First she identifies him as a Jewish man (v. 9). Then she percieves that he is a prophet (v. 19). Then she wonders if he is the Messiah (v. 29). And then, by verse 39, she believes, along with many others from her town, that he is the Savior of the world (v. 42).
Imagine what this woman has learned! The obscure Jewish man in verse 10 is the Savior of the world by verse 42. Undoubtedly, if she had known who he was at first she would have asked a different question. We know this because Jesus said so:
If you knew the gift of God, and who it is that is saying to you, "Give me a drink," you would have asked him, and he would have given you living water. (John 4:10)
Do you know who Jesus is?
What are you asking him for?