Junipers tend to do better with their roots covered. Your suggestion is apt, but I actually, it should be set deeper in the pot. However, I see a number of things that raise additional concerns.
Firstly, I assume the pot it is in has at least one drain hole. If not, either find a similar one that does or buy a diamond hole saw at your local hardware store and make one 1 to 2 cm in diameter.
Secondly, I'm betting that the plant is not tied/wired into the pot and that those rocks are, in a fashion, holding the roots down and/or the tree upright. If so, people often get away with doing this but it is not a good practice because accidentally bumping the tree will damage the roots and could be the source of the present trouble. Standard bonsai practice is to securely wire the tree into the pot. To do this well, the pot will need 2 to 4 additional holes to pass 2 mm wire. Get a 4 or 5 mm ceramic drill bit to do this should this pot (or its replacement) not have them. Querry 'bonsai repotting' for the details of how to wire the tree into the pot. There are good online tutorials by Bonsai Empire and Kaisen Bonsai as examples.
Thirdly, the substrate appears to be potting soil instead of a bonsai substrate. One can grow bonsai in potting soil but there are two problems one must be very attuned to: over watering and soil breakdown. Of course, roots must stay damp but just as important, they must get oxygen to live and do what roots do. As the soil gets old, it breaks down into finer and finer particles and the air spaces disappear --> roots die. Similarly, 'over watering' means the spaces between soil particles stay filled with water --> roots literally drown.
There is no alternative to soil breakdown other than removing the old soil and replacing it = repotting. On the other hand, one can adjust their watering habits to stop 'over watering'. One method is to stick a chop stick into the soil and drive it to the bottom of the pot. One then removes it and does not water until the chopstick is just damp at the very tip.
Lastly, this juniper must be outside and should be in full sun. They are not indoor plants! I suspect this has been a nice desk/table decoration for a few weeks. If so this decline is exactly what one should expect. Photosynthesis makes all the food and building material for the plant. Inadequate light simply means it is being starved to death.
Any one of these issues or any combination of them could account for the present state of the tree. Some exposed surface roots alone isn't a serious problem, but they should be covered. Not being covered simply means the surface roots will die, but the others under the soil surface would live on and ought to power the plant IF they are in an hospitable environment.