Hello Sam, there's probably a few ways to go about it, from my experience, I would check the 'getDevice' method in the DeviceRouter class from the JSON API which will return a dictionary with the devices properties where you can find a key:value pair containing the collector information for each device found.
So for example, you could send the call requesting devices from the "Devices" device class (root class), set a high 'limit' parameter to make sure you'll scan all devices in case you have a big deployment (not the prettiest way to do it, you could first make a call to get the actual number of devices and then use that as the limit value). From there you can extract all devices that have the collector value you're looking to change and with that, you can then use the 'setCollector' method from the same router to assign the collector you need.
You can find the documentation for the version you're running in the following link: https://help.zenoss.com/zsd/archive/json-api
Adrian E. Vergara