I have a widget area in my header. How can I have that display a different widget depending on what group is shown?

You could install widget logic and add something like bp_is_groups_component() && 'your-group' == bp_current_item() in a widget’s widget logic area.

The widget logic content filter feature looks like it could create something a bit more sophisticated than the above