I firmly believe that it wasn't "luck" that spared you, but God. Furthermore, what took place didn't happen just so you could go on living. Instead, I firmly believe that God spared you because He is trying to get your attention and speak to you through this event.
You see, so far in life you have ignored God. But this means you are not ready to die and meet God–and now God is giving you a second chance. Why is this? The reason is because He loves you, and He does not want you to die and enter eternity apart from Him. The Bible warns, "man is destined to die once, and after that to face judgment" (Hebrews 9:27).
Yes, I know it's not fashionable to talk about Hell today, but let me assure you that Hell is real–and you don't want to go there. And you don't need to go there, because God has provided a way of escape. That way is Jesus, who loved you so much that He was willing to give His life in exchange for your salvation. The Bible asks, "How shall we escape if we ignore such a great salvation?" (Hebrews 2:3). The answer is, we won't. Don't turn your back on God any longer. Instead, thank Him for sparing your life, and then by a simple prayer of faith commit your life to Christ and learn to walk with Him every day. God bless you.