The size of the solar system is estimated to be about 122 astronomical units. That's 0.00193 light years, not two light years.
On the gravity part of the question, how can the sun’s gravity extend so far, you have to understand the mass of the sun. Size doesn't equal mass but first it is good to have an idea of the size of the sun.
Here's an interesting image.
This is a very common rendering and probably what most people have in mind. It may still be on the pages of school text books, I don't know. However, the ONLY thing they got right about it is the order of the planets. The distances between the sun and planets as well as the sizes are way off.
The sun and planets look more like this

This does change your perspective on the solar system, doesn't it? Changes your perspective of the whole universe! You can fit about 1.3 million earths inside the sun. But gravity is not dictated by the size or the volume, it's the mass that's relevant. Well, the sun is about 333,000 times the mass of the earth so it affects far objects a lot more than earth would.