Yeah, they don't generally accept produce for donations as it can be hard to store and keep fresh. That said, if you can contact them far enough in advance then they can probably get a solution in place.
I used to volunteer at a food bank in a small farming town and mostly what they'd do with it is exactly what you did, find a church or shelter or something that can use it more efficiently/effectively.