Cylinder head choice

Hey, I’m fairly new here and pretty new to the whole automotive scene in general. I have a 318 L.A and I wanted to know if I could use 340x heads or 360j heads instead of the stock 318 ones. Or what would be better overall, just porting my 318 heads, or investing in some 340 or 360 ones? I would also like to know what the difference between the “X” and “J” code heads are. Any information would be greatly appreciated.

Thank you.