Well, DS refused to sleep alone for several weeks after he was born, despite our attempts to get him in the crib. We ended up borrowing a moses basket to make him feel more confined and putting that in the crib. Worked a little better but not great. Then we put him in the crib as long as he'd last and then hold him the rest of the night. Finally at about 6 wks old he would sleep in the crib 4 hours and we considered ourselves blessed!
So it was a transition, tho different than your problem.
You might try letting the baby fall asleep in the swing and move them to the crib once they're in a deep sleep. If baby wakes later and fusses in the crib, start over.