Could be the water/glass but it could also be that you are zooming in and trying to focus closer than the lens is capable of. The minimum focus distance of that lens is 8cm and most likely you can only achieve that 8cm distance with the lens zoomed out to the widest angle. Try zooming out all the way and trying the same shot, assuming you weren't zoomed out already.
Another problem is autofocus systems sometimes [usually] need a contrasty surface to focus on. A work-around is to aim the camera at something with texture and contrast, and that is the same distance away as your intended subject--- press the shutter release button halfway to get the autofocus to engage and once the focus is locked on recompose on your intended subject while you keep that shutter button pressed halfway. Once you're aimed at the right thing press the button the rest of the way. Works well for taking pictures of moving fish too.