Fixed put method in swift module

A logic error in this module prevented salt from being able to use the swift module to put an object inside a swift container.
Merge pull request #15148 from megaclite/develop

Fixed put method in swift module