The fort you found that at was occupied by both Confederate AND Union troops. The Confederate Calvary troop was not "B"...no info on the Union yet...will keep looking. It does look like a hat pin though....nice find.
Looking at this again I'm certain it's Indian war as that period letters are smaller than the civil war period. Plus the parts of the letter are narrower than a civil war period letter