I don't have the guts to do that. = I don't have the courage to do that.
Also possible: I don't have the nerve.
To say 'I don't have the heart to do that,' has a different connotation. It often means 'I couldn't do that because it would be too hurtful.'
For example, B finally works up the nerve to ask her out. She accepts. Later, she is talking to a friend:
She: B asked me to dinner. I said I'd go, but I don't really want to.
Friend: Then why didn't you just say no?
She: I just didn't have the heart to disappoint him.
I hope this is helpful,