If you replace
ddp_model_transfer = DDP(model_transfer, device_ids = [device])

with
ddp_model_transfer = DDP(model_transfer.to(device), device_ids = [device])

then, this error would disappear I think.
Honestly, I would recommend starting from a simpler version and gradually adding complexities to it. We could try:

See if this example 59 works in your env (after setting MASTER_ADDR and MASTER_PORT).
Replace the model in that example with a resnet 18 pretrained model
Adding data loaders