If the company invites you to an interview, that means the job is still open.
Alas, no. In fact, the job may never have existed in the first place: “Some companies use ‘interviews’ to do market research on the cheap. They ask you about your current or recent duties, your pay scale, and so on, to get information for comparison purposes.” Another possibility, Couper says, is that “they may already have a strong internal candidate in mind for the job but just want to see if they come across someone better.”