If you're far enough (like 1/2 km away), not by that 1st one. But you're sticking out as the tallest object in a large flat area and at high risk of getting hit by the next lightning strike, which will probably kill you.
If you're asking just about the risk of that initial lightning strike you saw while swimming or seeing from shore electrocuting you, you are probably okay if you're more than a few dozen meters away because the energy of the strike has spread out on the surface and dissipated in all directions from the strike point.
However, you are at great risk of being directly hit by the next lightning bolt. Lightning tends to strike the highest point in an area and given that beaches and seas are very flat, you're likely the tallest thing around.
There's a great answer by /u/gilgoomesh on reddit/AskScienceDiscussion about just this:
"Lightning does not usually penetrate deep into water. It disperses in all directions favoring the surface:
Generally though, a strike will dissipate within 20 feet (6 metres):
But lightning varies greatly in intensity so it could easily go further. Within 20 feet though, lightning could easily be lethal.
Outside 20 feet... the sound level in the water is probably the biggest danger. Lightning strikes generate up to 260 dB at 1 metre in the water (you coul d lose your hearing in one shot and the sound alone can kill fish). Even at 300 feet (100 metres) away this is still dangerous.
[on getting hit in salt water vs fresh water]
A lot of people are asking if salt water or fresh water makes a difference. This link discusses the topic:
saying that increase salt will increase the conductivity of the water and will cause the dispersal to be flatter on the surface but spread over a larger area. However it does not significantly change the danger of electric shock, burns and sound pressure waves which are mostly the same for salt or fresh water lightning strikes if you're within the energy dispersal area. The single most dangerous thing about being on the water in a storm is that your boat or your head or whatever may stick up from the water and once you're the highest thing on the water, you're a lightning-rod and you run the risk of getting hit directly.
Hypothetically, very salty water (e.g. Dead Sea) is a much better conductor than the human body and the electricity might path around your body (it's not a guarantee though since electricity likes to take all paths at once). But even if you avoid the electric shock itself, you're still swimming in water that has been raised in temperature past boiling point and getting battered by high intensity sound waves (think: small bomb blast). You're still looking at burns and possible internal injuries."
For more interesting answers and scenarios about lightning strikes: