Hard to follow what you are saying as you are talking about what trans gear and transfer case gear you are in.
If the transmission is in park, and the truck is not moving, the transfercase should not grind while shifting as nothing should be spinning.
If you were in neutral in both the trans and transfercase, it is possible the output shaft was spinning. If you tried to put the trans in park or engage the transfercase while the output shaft is spinning you can get a grinding sound.
[This message has been edited by LitebulbwithaFiero (edited 05-28-2018).]