How can I go to heaven knowing that no one else in my family is saved?
"He [God] will wipe every tear from their eyes. There will be no more death or mourning or crying or pain, for the old order of things has passed away" (Revelation 21:4). Without knowing the exact details of how God will accomplish this promise, it is difficult to speculate about how we will not grieve over this loss. However, we as Christians can take comfort in knowing that God doesn't lie. There will be no more mourning or crying or pain!
This is a good question, though. And, instead of allowing it to cause worry and doubt, let it motivate you to action. Use the emotion generated by the thought of spending eternity without your loved ones and, even worse, knowing that they will spend eternity in hell, to work hard for their salvation. Pray, live as Christ, witness--do all that you can while you have the opportunity.