The key is this line in the .wrap() documentation:
This method returns the original set of elements for chaining purposes.
.wrap() only operates on an element already in the DOM. So, you will need to insert it, then wrap it.