K2PO4 does not exist. It could be K2PO4-, or K3PO4, or K2HPO4. So, assuming it is K2PO4-, then ...
Molarity (M) is defined as moles of solute per liter of solution.
You have 4.0 L of solution, so now you need to find moles of solute.
moles is the grams divided by the molar mass
Moles of solute = 1270 g K2PO4- x 1 mole/173 g = 7.34 moles
So, MOLARITY = 7.34 moles/4.0 liters = 1.8 molar = 1.8 M (to 2 significant figures)