You can create an Array list of the tabs open and then navigate to the tab you want to close and do it.
Here is what I tried and it worked like charm.
ArrayList<String> tabs2 = new ArrayList<String> (driver.getWindowHandles());
driver.switchTo().window(tabs2.get(0));
driver.close();
driver.switchTo().window(tabs2.get(1));
All you need to keep in mind is the sequence and you are good to go.
Hope this helped you.