If you would like to donate your brain you will need to make arrangements in advance with a brain bank.
Because of how quickly the brain and organs deteriorate after death, you can either be a brain donor or an organ donor, but usually not both.
It's a race against time to see what bits they can get out and you want to make sure that they remove the brain first.
However if you do donate your brain they can usually harvest eyes, blood, skin and bone.
If you donate your body for research at a medical school your brain will not be removed at the time of death and it won't be suitable for the type of research you are hoping to participate in.
If you are still interested, here is a link to the International Brain Banking Network,
www.intbbn.org/registry-of-brain-banks.aspx, and BrainNet Europe,
www.brainnet-europe.org.
You'll want to pick a bank in your country and contact them to make arrangements. Pick a general brain bank like the ones at Harvard, John Hopkins or NIMH. If you donate to a bank that specifically does Alzheimer's or Cancer research then you're unlikely to end up in a gender study.
I don't think any of the banks will guarantee what research your brain will be used for, especially if you aren't planning to die right away.