"Why did you doubt," in Greek is εἰς τί ἐδίστασας, which literally is: why did you divide your mind in two? Because two things were here presented to Peter, 1) the strength of the wind making him afraid of being drowned, and 2) the voice of Christ instilling confidence and security.
"Why were you uncertain about what to do?" is conveyed through the Greek phrase εἰς τί ἐδίστασας, which suggests a mental state of indecision, as Peter faced two opposing forces: the threat of drowning and the promise of Christ's guidance.