You can't declare war yet, you only prepare for a possible war later.
The border is closed at the start of the game. Once the main story is far enough, you can access Dorgania, and then talk with King Lancafew in Kagabangui to get the border opened on their side.
It's also possible that you closed the border on your side, which can be changed in the command center building.