1) create a rectangle
2) create a line on top of the rectangle and apply whatever stroke you want to it
3) select the line and go to Object -> Flatten Transparency and select High Resolution and tick the box that says "Convert all Strokes to Outlines" ... press ok
4) select the rectangle, press ctrl+c/apple+c and after ctrl+f/mac+f;
5) select the newly created rectangle and the flattened line and apply PathFinder->Minus Front;
That should do the trick;
hope it helps;
You may (use copies for whatever you wish to keep):
1) Select the brushed path and Object>Expand Appearance, then Ungroup until you have only selected paths and delete all but the one outlining the brush, then give it the stroke back if it had one and it is still wanted;
2) Select the outlined path and the box and Pathfinder>Divide, then Ungroup and recolour the fill of the end parts of the brushed stroke.
Can I not Pathfind a line???
What you're describing is not a line; it's an open path with a live Brush Appearance applied to it.
Some Pathfinder operations can affect open paths. But the unexpected results you are experiencing are due to the Brush still being live, not a simple path. So you need to Expand the Brush so that it becomes a "nailed down" actual path. Then Pathfinders will interact with it as expected (that is, in their often unexpected ways):