Now, what is the volume of the Death Star? It's a sphere 160 kilometers in diameter[2], so the radius is 80 kilometers, which is 262,464 feet. Thus, the volume is 75 quadrillion cubic feet. This is about 100 million times the volume of our space habitat, so I'll assume it's 100 million times as expensive. This comes out to $8.52 billion, but building materials aren't everything, so by completely unsourced speculation, I'd estimate the habitat to cost $40-80 billion. Note that this doesn't count the cost of actually getting it anywhere and keeping it running. But hey, you asked how much it costs to build a space habitat, not how much it costs to maintain one.
There are bigger space habitats
than the Death Star. Using the calculations above, this cylinder would cost $10.5 quadrillion. Like the antimatter car (link to first blog), it isn't something Bill Gates could afford. Interesting digression: the EPA has an estimate on the value of a human life: $7.4 million in 2006 dollars.[3] From this calculation, I can conclude that the entire population of earth is worth less than a fleet of six or so O'Neill Cylinders.
Yes, that is a very badly drawn alien. This is a science blog, not an art blog.
Now for the second method: take the cost of a smaller object and multiply it. The International Space Station cost somewhere in the neighborhood of $100 billion.[4] The ISS has roughly the living space of a six-bedroom house, which (presumably) is habitable for six people.[5] Multiplying upwards, the first habitat
(with 10000 people) would cost $167 trillion and the second habitat (with 2-3 million people) would cost $250 quadrillion. Those numbers to seem more reasonable than the first, though they (like pretty much every other number I come up with on this blog) are probably off by a few orders of magnitude.