They are usually interchangeable. "Only" excludes other things, other people. "Just" emphasizes smallness. I assume that there are regional differences and "only" is more common is some regions and "just" in other regions.
At work, only Dan was qualified to work on network problems. (= Dan, no other workers)
Do you want any milk and sugar for your coffee? Sugar only, please. (= sugar, no milk)
My grandson is just/only three years old. (= emphasizing the young age of the grandson)
Just/only a few people showed up for the public hearing. (= emphasing the small number in attendance)