Need some help determining what year 5.7 hemi I bought

Hello,
I will be most grateful if someone can help me figure out what I bought,
I purchased a 5.7 hemi with awd Trans last week. It had caught fire and everthing above the valve covers melted. I was told it was out of a 2015 300c. After some checking, I am under the impression that no 5.7 hemi option was available in awd, so I believe it is older. I looked around the block near the pan and have not seen any stamped numbers. I did find a Barcode label on the transmission with the number
TI2TJ127460112 and p5210848OAK. If the first number is the engine sn, I think it may actually be a 2004?
I will look again on the block for a stamping somewhere.

After removing the blob that once was the intake manifold, I see 4 solenoid looking modules in the block galley. Is that for mds?

I was looking for a gen3 to put in my 72 demon. I have tons of experience with rb and LA engines, but non with the new hemis.
thx in advance