Was this draw the right thing to do?
Black wins starting with 39. ...Kg5 (Kf5 also works). In order to keep Blacks h4 pawn from promoting, white's King mut always be on be on a square touching the g2 square. A number of moves can be played but they all lead to both pawns being captured. Then Black captures the other pawns and promotes his. You should click on the Analysis button (not game review) and work through the various moves until you understand.
Edited to add --> In the future link the game or at the very least. supply the date and you opponent, along with the move number if applicable.