Opted to make a new post instead, as it will be a little wordy and I made terrible Paint-quality pictures to go with everything. Here goes. As this is really only helpful if your river freezes during winter, here's hoping it does. Otherwise it's kinda a waste of time
The way I understand your embark to look is a bit like this:
a teeny embark area with a river running more or less dead center through where you want to build. You seem to want an above ground fort with a nigh impenetrable moat despite the river. On to that.
Build your walls as planned around the entirety except over the river. You can build the walls OVER the river, but careful not to make things harder on yourself later. Gather a few stones in stockpiles near the river, both inside and outside the fort, at any effected wall sections. You have as long as you need to build these other wall sections. Bear in mind that, other than the stone stockpiles near the river, basically none of this step NEEDS to be done by winter, which is not the case in the following part.
Dig a hole that stretches under the river AND under the planned ditch area. Planned ditch area in that picture is based on a 2 wide gap, as shown in your opening post. It is marked with red dots. This ditch should be as wide as the river is, and the floor grates shown should be as well. They will be above the head of any swimming building destroyers, so they cannot be broken there.
Once the water freezes, work begins in earnest. Designate ramps from inside the ditch to breach the river bed. Channel out the ice between the ditch entrances and build walls where shown to act as your ground tiles. Be sure to wall off your ditch entrances and the channeled out river tiles before spring, or Fun will happen. Less time sensitive after those critical bits is channeling out the overhang area for your ditch, so it will operate.
Come the spring thaw, the ice will melt. The river will flow up to the wall you built near the ditch, pour down the ditch, then water pressure will push it back up the other side to the same Z level, and it should continue to flow from there through your fort. Doing the same on the other side of your fort should have similar results, with the river flowing out.
Hope this helps!
No seriously if i'm badly misunderstanding something here someone please correct me because it's been years since i played with water pressure and diverting rivers and i'm not 100% sure they keep their flow if you drop them through a U bend and I don't want to be telling someone wrong info and wasting a bunch of their time