Yes, this is completely possible today. In fact we already have large elements of it.
We have submarines and submersibles, we have diving gear. There are underwater hotels.
You have two basic choices for the buildings:
You can be linked to the surface air and have routes to the surface. This has the advantage of letting you enter and leave while being dry and cheaper air circulation. Your buildings need to be strong enough to withstand the water pressure though.
You can pressurize the buildings to the same level as the water and just have open pools for access in and out. This has the advantage of letting you access the water around you from the buildings without needing airlocks but you need to pump down and pressurize all of your air. Anyone heading to the surface would spend a LOT of time in decompression.
In practice there would most likely be a combination of these, with buildings at the top linked to the surface and others deeper open to the water. Transition between these buildings could be done using air locks to equalize the pressure.
Note that the depth you mention (400m) is just inside the range of human survival. The records for deep diving at external pressure are around 432m. In practice you would most likely need most of your city higher (and at less pressure) than that as we just have no idea what the long term effects of living in those conditions would be.
The problems here aren't technical. They're practical and financial. Would you want to live in a steel can underwater breathing recirculating and pressurized air? Especially when doing so would be substantially more expensive than living on land.
We have the technology today to build this. What we don't have is the reason to do so.