all arteries in the body transport oxygenated blood away from the heart except for the pulmonary arteries. Recall that in systemic circulation, when deoxygenated blood is transported back to the heart, the blood must be reoxygenated.
The function of the pulmonary arteries is to transport the deoxygenated blood to the lungs where it can be reoxygenated through diffusion. They are still called arteries because they transport blood away from the heart, regardless of whether or not the blood is deoxygenated or oxygenated.