While I am not as familiar with the battles for Pacific Islands in WWII between The Japanese and The US, I am familiar with the reasons given for the US's struggles in the Vietnam War. There are some fundamental differences between the two conflicts you mention.
The fight for the Islands of the Pacific was for strategic territory, with an eye toward the larger conflict of a potential future invasion of Japan. The Vietnam War was largely a civil war between two different groups. Although, there was a North and a South, primarily it was a fight for who would control the country. We were assisting one side in this civil war, the South.
Because, this was such a distinctly different type of struggle the way it was fought was very different One example that is often given, is the the US and South Vietnamese forces would "take a hill" and then simply abandon this hill sometime after. This wasn't strictly a fight for control of land, as compared to the Battle in the Pacific.
In addition, the style of fighting the opponent employed was different. The Japanese often would create bunkers and other protected defensive positions from which to fight. The North Vietnamese and the NVA utilized "guerilla" tactics that involved attacking the US and the South Vietnamese forces and then disappearing. The NVA wasn't as concerned with taking a city or a village and holding it.
In Summary, the tactics used by the North Vietnamese were very different tactics than the Japanese used. The US had never encountered these tactics before and this is largely attributed as to why we struggled in Vietnam.