Getting an ant in Animal Crossing is a matter of baiting it out. Place a rotten turnip somewhere on the ground, then walk away and give it a little time.
Come back a few minutes later, and you should find ants have gathered around the spoiled turnip. It is a simple trick that turns a piece of rotten produce into ant bait, ready for you to catch.