How to reach either a 6 Hearts or a 6 NT contract?
Assuming you are also playing Texas (highly recommended) then the Jacoby Transfer by Responder followed by a jump in the transfer suit always shows exactly 5 card length. This allows partner to jump to 6H, giving you the choice to correct to 6NT with only a doubleton, as you had.

If Partner has 6 card length sufficient to play slam opposite a small doubleton, then partner transfers at the 4-level and jumps to 6H, which is to play.

Don't even think about a 6D jump without serious partnership discussion. Both sides of the table will be wondering if it is telling or asking; and what precisely the subject of the tell/ask is. 



Here are some additional agreements for Responder's rebid that are typically employed by partnerships playing both Texas &amp; Jacoby:


Texas followed by 4NT = Blackwood (your usual variant)
Jacoby followed by 4 NT = Quantitative
Jacoby followed by 4C = Gerber
Jacoby followed by 4 of the transfer suit = slam interest with a weak 6 card suit