Laparoscopic.md reports that the last section of the ileum, the terminal ileum, is where B12, other water soluble vitamins and nutrients passed on from the jejunum are absorbed.
The ileum is the last of three sections of the small intestine, and it is approximately 3 feet long, as described by the Encyclopaedia Britannica. It attaches to the jejunum, or middle section of the small intestine, and the ileocecal valve, which allows entry into the colon.
Wikipedia notes that the ileum has muscular walls comprised of folds. The surface of each of these folds has small, finger-like villi. The villi are covered with epithelial cells and allow for the absorption of vitamins and nutrients from digestion. Capillaries in the villi transport glucose and amino acids created during digestion to the hepatic portal vein and liver. Lacteals in the villi absorb fatty acids and glycerol. The muscular walls of the ileum contract in waves to allow the products of digestion to be moved through the ileum, digested and then moved on to the colon if not fully digested in the ileum.