ANSWER: The first scripture you are referring to regarding heaven and the apostle is Philippians 1:23, where Paul states he has a strong desire to leave life and be with Jesus. The second scripture is in 2Corinthians 5:8 where Paul says to be absent from the body, or dead, is to be with Jesus Christ.
One important aspect to realize here is that in the case of either text Paul states nothing about a hell or place of eternal torture or or having an immortal soul (and going directly to Heaven or Purgatory when you die). These beliefs must be read into the scriptures (which is called Eisegesis).
In theory, a person could think humans go to hell or heaven when they die but still believe that souls placed in the fires of hell would be eventually destroyed (not tormented forever). In both cases, the defender of the orthodox position would assume that a resurrection does not occur between death and coming into the presence of the Lord. Yet, the apostle Paul in 1Corinthians 15 presupposes that living forever can only be received through a resurrection.
"For if the dead do not rise, then Christ is not risen. And if Christ is not risen, your faith is futile; you are still in your sins! Then also those who have fallen asleep in Christ have perished. (1Corinthians 15:16 - 18, see also verse 22).
It is necessary to look at the important verses on any given topic instead of just figuring out a doctrine from a few that seemingly favor a particular position. Neither 2Corinthians 5:8 nor Philippians 1:23 state that the apostle Paul (or any believer for that matter) would immediately come to Jesus or go to heaven when they die.
We know from Revelation 20 that people are not judged (those not saved during this life the first time) until the time after the 1,000 year reign of Jesus Christ comes to an end.
But the rest of the dead did not live again until the thousand years were finished. This is the first resurrection . . . (Revelation 20:5).
The apostle Paul never taught, nor does the Bible anywhere teach, that humans, when they finally die, get put in hell - let alone get pulled back out at a later time, judged yet again, then put back! It also does not teach that the reward of the saved is some heaven that is far away from the earth. The scriptures we initially referred to do not state that humans have some kind of immortal soul that is conscious when it is separate from a physical body.
It is easier to say that in Philippians 1:23, when the apostle Paul would die, he would not be conscious at all of time passing him while he was in the grave. Therefore, after the moment of death comes, his next conscious moment will be his resurrection and the return of Christ to the earth.
Neither of Paul's text says when Christians enter the Lord's presence (e.g. heaven). If I said it was to occur when Jesus returns (as per 1Corinthians 15:23 and 1Thessalonians 4:14 - 17), there's nothing in either text to contradict this belief.
To understand what Paul really means we must base our conclusion on what other parts of the Bible teach rather than our own pet ideas or just assuming that what we were taught in the past is true. A very good rule of studying God's word is that we should allow the Bible to define and interpret itself. In the end, the apostle Paul choose not to want to die (Philippians 1:24 - 25).