my doorbell stopped working and I tested it with a multimeter and found no current to the box. How do I locate the transformer to replace it?
Typically, the doorbell transformer will be on or near the main service panel.
This is usually, done to save money on wire. If the transformer is mounted to the service panel, you'll only need about a foot or two of 14/2 cable to connect it (which can usually be reclaimed from scrap). The rest of the wiring from that point on will be cheaper low voltage cable, since doorbells typically run on 24V circuits.
For your next home, make it a point to figure out what circuit it's on before the thing goes on you. If for no other reason to know when to tell people they have to knock should you have that circuit turned off for a repair.
Start by checking various obvious places: utility room, attic, anywhere with exposed studs or joists. Narrow down your location by looking at the direction the wire from the doorbell goes into the wall. If it goes up, check the attic, and down, check the basement. At each location, check every junction box in the wall or ceiling to see if there's any extra wiring or device attached.