Recent work has demonstrated the viability of DNA robotics and artificial molecular machines for molecular transportation and cargo sorting with potential applications in manufacturing responsive molecular devices, programmable therapeutics, and autonomous chemical synthesis. We extend previous work on cooperative molecular transportation using artificial molecular machines, where we similarly functionalize DNA-conjugated microtubules driven by kinesin motor proteins. DNA-functionalized microtubules propelled by surface-adhered kinesin motors enable the self-organization of molecular swarms, where such swarms load and transport cargo (microbead) in a simulated chemical environment. We demonstrate programmable molecular swarms for cargo sorting and cooperative transport. Cargo loading occurs when sufficient microtubules are at the same location as the cargo, and cargo unloading occurs at specific points in the environment through interaction with localized DNA species. Our contribution is the design of a chemotaxis molecular controller, forcing the swarm to tumble (random change direction) when the system is not following a molecular gradient corresponding to the cargo type, thus directing it to specific points for cargo unloading. This work thus contributes to the open problem of how to best design programmable molecular machines for various tasks in microscopic environments.