A soldering gun is a little overkill for this little job. Gonna make it harder.
Put the end to the pin and get it hot for a few seconds. Then bring the wire in to the tip and let it melt and draw down the pin. You are going to wrestle with that gun to get close in to the board.