Heat oven to 350oF. Place a large piece of aluminum foil onto a baking sheet. Place tenderloin in center of the foil; season with thyme, nutmeg, salt and pepper.
Sprinkle the onions and cranberries over the tenderloin. Pull up sides of the foil creating a pouch but not sealing yet. Pour chicken stock over tenderloin.
Bring up all edges of the foil to meet. Seal the edges and roll down so it is sealed but not too tightly. Bake at 350oF for 30 minutes.
Remove from oven; let stand 5 minutes before opening the package.
Remove tenderloin and cut into 1 1/2-inch thick slices. Place sliced tenderloin onto a platter and pour onion cranberry compote with juices over top to serve.