I would assume building it on earth would be a bad idea because of the immense power needed to bring it to orbit. But what about in orbit, is it possible with todays technology on such a big scale?
You are correct that it would be impractical to build such behemoths on a planet. Enormous projects like those require the necessary motivation, resources, and technology.
Building a starship the size of a city is a much greater challenge than building an earthly city. Building without gravity would come with some advantages. You wouldn't need cranes, and there would be no "heavy lifting" of the same sort when heaviness is no longer a thing, per se. But every advantage of space construction will be outweighed by numerous challenges, which I will go into more later.
Here on Earth, cities emerge for economic purpose. People gather in an area because there is a resource there, or something useful going on there. It's very rare for a city to be built from scratch at the direction of a wealthy person or entity. And even then, it is for some specific purpose. Building something the size of a city in space which can not only house hundreds or thousands of people, but also has the ability to accelerate to incredible speeds would need some extraordinary motive. In Star Wars, the motive is heavy-handed governance. There is no one to govern in space right now. In Star Trek, the motive is exploration. With current technology, we cannot realistically explore outside of our solar system. For the organizations dedicated to exploration within the solar system, like NASA, funding is a constant battle, and amounts to a fraction of a percent of the budget that would be required for an Enterprise class starship. The only motive I can imagine outside of the world of religion would be the opportunity to travel to other inhabited worlds.
As you mentioned already, you don't want to build the thing here on the planet, because launching it up there would be too costly. Likewise, sending the resources to build the vehicle piecemeal would be too costly. So where do we get the materials that we would build a starship from? They need to be in space already, not in the gravity well of another planet, but just floating around out there.
While some necessary trace elements could be mined on a planet and sent up, the bulk of the building material needs to come from asteroids or comets. So the primary thing we are missing right now, in terms of resources, is a space mining industry. There are people working on that already, but so far, no asteroid has been mined. And it's very likely a long way off. To support a project of this magnitude, the industry would need to be mature enough to provide the resources required on-demand at a price that is comparable to mining here at home. If this is not so, the total cost of the project would be even further out of reach.
We are already working on the technology to find other inhabited worlds. We have found nearly 4000 exoplanets so far, and NASA has predicted that we will find evidence of life out there within decades. If we do find life out there, can we send people there to explore it with current technology? Well, no. We have no hyperdrive. In fact, it appears most likely that travelling beyond the speed of light is not possible with any technology. It might be possible to send sleepers, or a generation ship, which our ancesters might hear back from in many thousands or millions of years. But, it's a lot harder to get excited about sending away our people never to see them again. So again, who's going to pay for that?
Engine technology is not the only thing we are missing. Assuming we have the raw resources we need, we still have to process them into the materials that we would need for this ship. So beyond space mining, we need to figure out space smelting, space manufacturing, processing, assembly, etc. There are a nearly unimaginable number of details to work out. We would essentially need to reimagine and rebuild civilization itself again. Consider, for example, the fact that most of these things require burning fuel when we do them here. All "burning" here on Earth, with few exceptions, requires the presence of a volatile chemical that is so abundant here that we tend to take it for granted: oxygen (O2). In space, we either need to reinvent every process that involves oxygen, or come up with a whole oxygen production industry in space. Here on Earth, trees do that for us. But they are huge. And they like having gravity. So we might turn to algae or something. But again, my point is that whole industries and technologies have to be reinvented for space. Can we do it?! Yes we probably might be able to! But the technology does not currently exist. Not yet.
Also, a project like this would take a heck of a long time. Who is going to be up there doing all of that building? If thousands of people are going to be up there day after day, we need to develop an entire space farming industry to support them. We need whole cities to be already up there just to support the human needs of those construction workers.
That's pretty far out of reach right now. So what about robots? Artificial Intelligence is still nowhere near being able to provide an autonomous robot mind capable of executing a complex construction project, but what about remote control? If the whole project took place in orbit, we could communicate with a robot army with a reasonable time-delay, and control them completely from the ground. It would take just about forever to do almost all of the construction remotely. But, it's theoretically possible, I guess, given that this robot army exists up there somehow.
So... I guess all we need is a robot army, full-blown space industry, technology that may or may not be possible, and a reason to want to build this thing. In the words of Lloyd Christmas, "So you're telling me there's a chance!"