I've run into variations of this before. It involves multiple weldment profiles in the sketch sharing the same endpoints.
This time, I had a gap where one channel had to be extended into the other to create its cope.
I created a Trim/Extend feature, and had to select the extension piece to be kept, not discarded (although it wasn't there prior to later be discarded; it was generated by the feature). Then, when I completed the Extend, the body did not merge.
Above: selected orange body did not merge when extended from the foreground body.
Note here, that the selected orange line is not the same line as the one on the far side of the channel with holes in it. The error is generated because of the shared endpoints. I may have avoided this if I had extended the far sketch line to cross beyond the crossing line instead of drawing a new line (highlighted, orange) in the sketch.
There is also the possibility of fussing with the node dot and its trim priorities. I try not to fuss with those when there are more than two, for simplicity. That also could have prevented this condition.
This happens. Do not fret.
Naturally, the simple workaround is to Combine the two pieces into one body. FYI.