Humans have specialized nerve receptor cells situated within the mouth and tongue for the "shapes" of certain molecules....acids, alkali's, sugar, salt, umami, and fats. The nerve fibers are housed in what we know as taste buds. When these receptors are stimulated a message is relayed to the brain for interpretation and we sense [taste] sour, bitter, sweet, savory. THe taste molecules that read as bitter, sweet, and savory are the classic "lock and key" type receptors. IE: a particular shape fits into the matching receptor site on the outside of a cell, the door opens, and the message gets directed into the cell. These are known as G protein-coupled membrane receptors. About 50% of modern drugs are designed to work via this exact mechanism and include some chemotherapeutic agents, antihypertensive agents, glucose regulating drugs, and certain classes of antibiotics.
In your case it sounds like the "taste" receptors are currently working OK because you are able to sense the basic tastes of sour,, bitter, etc. It is the smell component that is probably out of whack since anywhere from 75-95% of what we experience as flavor depends on something called retronasal smell. It is from volatile compounds stimulating the olfactory nerve endings present at the back of the nose which gives us the experience of "flavor" For instance, without input from smell, coffee would be experienced only as bitter water. If flavor were a picture in a coloring book, tastes would map out the lines, but colors would get filled in from smell. Again, some medications[mostly cardiac and some statins] can interfere with a person's ability to interpret "flavor" Vitamin A and zinc deficiency within olfactory cells and/or damage to the mucosa has also been linked. In light of your recent bout of respiratory infection, you may find that making sure your diet in rich in these nutrients helps. Good news is that most of the time the impairment is temporary.