Animation Blueprint code with different skeletons

Here is the answer for you

https://docs.unrealengine.com/5.0/en-US/skeletons-in-unreal-engine/