If my partner responds 2D to my 1NT opening bid. I have zero to 2 cards in Hearts. What do I bid?
I think you need to understand the concept of Captaincy.
During the process of bidding, it is not always the case where both players are trying to exchange information on an even ground. Sometimes one player will become the Captain and await his partner to give him the information. In other words, the Captain has the say to this bidding sequence. His partner should follow and respect the Captain's decision.
In your scenario, whenever you open a natural 1NT, you immediately surrender your hand to his partner. Your partner will dictate how the bidding should go. If he decides a transfer should complete this bidding, you are obliged to accept this transfer.
There are two circumstances that you can have a say about the bidding:
1) When partner passes the ball back to you. Example: You open 1NT, letting your partner do whatever he likes. He now bids a natural 2NT as an invitation. Now he passes the ball to you and you will decide whether you should go game or settle for partscore.
2) When you like what your partner is doing and decide that a simple "I accept" response is not enough to allow partner make the correct decision. Example: You open 1NT, your partner bids 2D as a transfer to 2H. You hold massive (say 4-card) support and good controls, and you are afraid that a simple 2H response will make your partner ship miss a light game. You can refuse this transfer by bidding 3H, or some other bids that your partnership has agreed to.
You open 1NT thereby letting your partner be the captain. He asks you to bid 2H. He does not pass the decision to you and you actually dislike Hearts. You have no choice but to believe 2H is the correct bid. After all you are not sure what hand he has - he may have a massive hand wanting to bid some more after you accept the transfer, or he may have a Yarborough with only a string of Hearts and you definitely want to play in 2H. Your partner is the Captain and you better respect his decision.
As for why you would have a void in Hearts after opening 1NT, you will explain this to your partner. But even holding a void you should still accept this transfer: better play in 2H than some four-level nonsense doubled.
(Note that some unusual systems may behave differently, but I think I'm giving the right answer to all of the common systems employing transfers, including Standard American (and 2/1), Acol, SEF, and Precision.)
A 1NT opening bid promises a balanced hand (or sometimes a semibalanced hand) as well as the agreed point range. This means you must have at least 2 cards in every suit to open 1NT.
If you have only 2 cards in hearts, you still bid 2H. If partner has a weak hand, then playing in a 5-2 fit at the 2 level is still your best contract (and, in particular, better than 1NT or 2NT). If partner has an invitational or better hand, you will have more chances to clarify whether you have only 2 or at least 3 cards in hearts.