Shamokin was originally the name of an Indian village on or near the site of present day Sunbury.
Sunbury, the town (today, city), was laid out as Sunbury in 1772, and was never known as Shamokin.
You mention the census....the census was first taken in 1790, and by then Sunbury was already Sunbury, and would not have been referred to as Shamokin.
The current city of Shamokin was laid out in the 1830's, became a borough in 1864 and a city in 1950.
To add to the confusion, there is also a Shamokin Township in Northumberland County. Neither present day Shamokin nor Sunbury are within its borders today.
It might help if you provided more details about the family you are searching and the census years you are looking at.