Under my sink is 1 non gfi receptacle that controls dishwasher and garbage disposal. I want to put 1 gfi receptacle to replace current one. There are only 3 wires - one black one white and one red. This is a stand alone outlet and will not power any other outlets. How would these 3 wires connect to the outlet?
This is complicated
Think for a minute. Does your garbage disposal run continuously? No, why not? Because there is a switch on the wall you must throw. When the switch is off, does the dishwasher still work? Ok, then clearly the two sockets on the receptacle are controlled separately. That's easy to do by breaking off the tab separating the two screws.
There is no way to provide that with a GFCI receptacle. You would need to provide GFCI protection another way.
Ok, go down to the service panel. Is the dishwasher and disposal on the same exact breaker? Is it a single breaker? A double-width / 2-pole breaker? Two separate breakers, hopefully adjacent?
Reason I ask is it was common to put the disposal and dishwasher on a multi-wire branch circuit. It uses a 240V double breaker (or 2 adjacent breakers) plus neutral to provide two 120V circuits on only 3 wires. . It powers one 120V load between black and neutral, and the other 120V load between red and neutral. It is very common to punch this down to a 2-socket receptacle which has been split (and the disposal is also switched). ---- If you have this setup, you can easily fit GFCI protection by using a 2-pole GFCI breaker. It's an expensive breaker but it protects both circuits, and any other way of doing this is rather ugly. Remember the disposal must be switched, and you can't switch a GFCI receptacle.
If both dishwasher and disposal are on the same simple breaker, you can fit GFCI protection by fitting a plain 1-pole GFCI breaker. You can also protect it with an inline GFCI device such as a deadfront, which would need to be along the circuit's cable between the receptacle and service panel.