Fortunately for trainers coming to Ultra Sun and Ultra Moon, you can find yourself a Ditto only a few hours into the game. As you enter Konikoni City, you'll find the Konikoni City Police Station. Speak with the officer at the back of the room and there you have it, your first Ditto!