I don't have the sheet anymore, but any yamaha golf cart dealer can tell you.
j-10 79 to 81
j-17 I think 1982 (one year only cart) different cylinder head but can use any year cylinder.
j-31 these are g-1 yamaha 79 to 85
j-38 is g-2
jf2 is g-8
jn7 would be g-9 g-14 g-16 up to g-22 (not 100%) what actual model but a newer cart anyway
What you need to look out for are the g-8 carts that were converted to g-16- g-22 with a few modifications.
This was great if you owned the cart but bad if you bought one and thought you were getting a g-14 to g-22.
I hope this helps a bit.