Preheat oven to 350° F.
In a small bowl, stir together the garlic powder, onion powder, salt and pepper.
Pat the pork loin dry with paper towels. Rub the seasoning mixture over all sides of the pork.
Heat the olive oil in a large skillet over medium heat. Add the pork loin to the pan and brown on both sides, about 3 minutes per side. Transfer pork to the center of a large rectangular baking dish or roasting pan, with the fat side up.
Add the butter to the skillet. Once melted, add the apples and onion. Cook for about 3 minutes, stirring occasionally, until they start to soften. Then transfer the apples and onions to the baking pan, placing them around the pork loin.
Add the garlic to the skillet and cook, stirring, for 30 seconds.
Add the chicken broth, apple juice, Dijon mustard, fresh thyme and fresh rosemary to the skillet. Cook for 2-3 minutes, stirring and scraping up the browned bits from the bottom of the pan. Then pour the contents of the skillet over the pork, apples and onions in the baking pan.
Bake for 50-70 minutes, until the center of the pork registers 145° F on an instant read thermometer. The cook time will vary based on the size of the pork loin, so measuring the internal temperature is the best way to tell when the pork is done.
Let the meat rest for 10 minutes. Then slice and serve with the apples, onions and sauce from the baking pan.