The P1399 is a random misfire and the P0302 is cylinder 2 misfire. If this is a 4 cylinder I would check the wires, distributor cap, rotor, and sparkplugs especially on cylinder 2. If it is a V6 you most likely have a bad coil on cylinder 2.
If the wires and all that are good, pull all plugs and take a look at them. Also, while you have them out test compression. It is possible you have a bad injector as well, or even a bad vacuum leak as well as an air leak. Check the hose between the throttle body and the air cleaner and make sure it has no rips or tears. If you have an oil leak in the distributor it could be an issue, as well as oil leaking in the spark plug tubes. The oil in the spark plug tubes will be evident when you pull the wires and remove the spark plugs. If oil is leaking into the distributor cap that will create a similar issue, pull the cap off and look inside the cap for evidence of oil and carbon tracking. This could also be a bad or weak coil.