I trying to get a shiny beldum in ultra moon and I need a harvest trevenant.
Unfortunately, the only easy way is to have someone breed it for you (or as EdDaBoss said, spam the GTS until you get it.) But if you'd like to get the Trevenant yourself, here are the steps to take:
Here's a setup that would work great:
Once you find a Phantump, lower its HP with Decidueye. Then switch to Bisharp and check the ability of every Phantump that gets called in. Once you find one with Harvest, catch it and find a buddy who can help you evolve it.