Replacing a fan fixture with a light fixture
Ground (bare, green or green/yellow) can only be a ground. 

You need one neutral/return, and it must be a white or gray wire, so that's your white. 

You need one "switched-hot" wire.  Electrical code says you can use any color not already mentioned.** An often-used convention is that a switched-hot is the color other than black, i.e. red. 

The remaining wire gets capped off at both ends. Put a smallish wire-nut (e.g. orange if you have it) and hold it on with a few loops of tape; as wire-nuts are prone to falling off single wires. 



** outside of certain industrial installations.  The general idea is that electricians should measure instead of assume.