Good job. As a law enforcement officer myself, I commend you...but yes, also admit that could have been a different outcome if it wasn't just a scared youngster.
And in the US, as well as most of the world, as "right as it seems", you can't shoot someone just because they invaded your home. Even if they attacked you, you'd do what you have to do...but the laws will make you responsible for your actions, sorry to say. Not worth it. I've seen it before.