You actually can't do what it is you are wanting to do.
CDMA is one network and GSM is another. They are not the same, and are not interchangeable. So you can only use a CDMA phone on a CDMA network, and a GSM phone on a GSM network. This would be why you are getting the message.
For example, Sprint has a CDMA network and AT&T has a GSM one. This is why phones from one will not work for the other. You would need to either get a CDMA SIM (to go with your CDMA phone) or get a GSM phone (to go with your GSM SIM) to make it work.