Why do you say 1000 x 5 = 5000? Do you mean 1000 ug/ml x 5 ml = 5000 ug? But if, as you say, your aliquot is 5 g, not 5 ml, you don't have 5000 ug in your solution. The volume of your aliquot is 5/1.0017 ml, so the mass of analyte in your solution is 1000 x 5/1.0017 ug. Divide this by 250 to get your ppm.