Seems to me that you're plotting for OBAFGKM stars, applying them to your route, and then switching to realistic map, based on this image. That's why it's then plotting you through brown dwarfs. Realistic mode doesn't care about your filters, it just finds you stars and tries to get you to your destination. You need to ensure you're still on map mode, otherwise it's going to try and re-plot and ignore what you've got checked.
Also, if you've filtered for main sequence stars, and then before you jump it says your next destination is anything but up in the top right, then cancel your fsd charge immediately
and check your filters again and make sure they're being applied properly. Never just blind jump into a system assuming it's of the right kind you've filtered for, the game will always tell you what's up next before you jump, but you have to watch for it before it disappears.
You should never just run out of fuel. I still don't get how people manage it, unless they're doing it deliberately or pushing themselves into really far out places, but you can always see your fuel gauge and it takes no effort to check it, so if you see it's low and the next jump is going to leave you stranded, then just... don't jump. Check your map, find a scoopable star, jump to that. If you're only filtering scoopables and refueling on each jump it's nearly impossible to run out. If you start to, you've messed up.