I am in the home stretch of fixing a rotting wood deck/termite situation myself, and totally agree from everything I've read and seen personally - the best solution is get the structure out of contact with the ground and try to reduce any water/ponding. If this is a garage where you drive a car into it, then you'll likely be looking at a major work, but if it's more like a shed structure - then you may be able to get the structure raised using jacks and concrete support piers. There are ways to pick up and move structures, repour a foundation and then set the structure back on it (house/mobile homes do this).
But you may not want to deal with this stuff for a small building (my dealing with a 10 foot x 10 foot deck was pretty much my limit), so if you're okay with the structure eventually being torn down/rebuild with an above grade foundation, my suggestion is to do termite treatments and try to get french drains/retaining walls as
@lthenderson suggests to funnel any standing water out as well as you can, and keep an eye on it until you decide if it's worth getting it rebuilt with a decent foundation eventually.
No wood, no matter what it's rated/treated with/whatever is going to last without rotting if it's touching dirt. My deck was built out of pressure treated pine, and everyone around my area is shocked it lasted longer than 10 years. (NOTE: It was like this when I bought the house)
Adding the rocks is only going to make things harder in my opinion, because of what you are already seeing - they make it easier for decaying organic matter to collect and allows for weeds to grow, you can't actually mow/clean it easily, and the rocks are going to sink/migrate because nature is a constant and ground settling/buildup of debris/movement of the pebble/stones. You could try adding a containing border, but it's not going to really help in the long run as you didn't raise the structure, you just exchanged some of the existing ground level with the stones and the garage is still in contact with ground & water, and in another few years, there's going to be a good amount of dirt in the stone/rock border and you're back to where you started again, but having to dig out a bunch of stones to boot and deal with the occasional pebble projectile when you mow anywhere back there.
Termites (at least the subterranean ones I'm dealing with) can only survive in damp/darkness and they are drawn to rotting wood. They will die if they dry out (why they build mud tunnels) and if they are exposed to light as well. So the main things are: remove the damp, remove the darkness, and making sure they don't have direct access to wood (no attractive materials in contact with the ground).
And one of the things I also learned: termites are EVERYWHERE. Even if you got the immediate area treated, they'll still be in your yard, the neighbor's or down the street even. You'll want to treat your whole property to ensure that if they do come back to check out your house, it's not easy, and they'll start dying if they stroll through. I am DIY perimeter trenching my house/all of the deck footprint with Taurus (generic Termidor). I've done extensive reading on how to do it right, so I'm hopeful I don't have to deal with this mess for a least another 5-10 years.