There's some fusion of dated, soon to be dated, and sort of current information here. The Surface Warfare Officer Division Officer Course, SWOSDOC, which has at various times been 2 months, 4 months, maybe even 6 months long and existed in Newport... Doesn't exist. Hasn't existed for a decade now. Over that time, the general scheme (and this is the mostly current, but potentially soon to be dated information) was report to a ship (though you may or may not receive a few weeks of schools en route depending on your orders, if you do those schools may or may not be in Newport), spend about a year qualifying OOD, then head to Newport for a 3-week Advanced Shiphandling and Tactics course (SWOS-ASAT), then go back to your ship, qualify SWO, and remain until your orders run out. The current first tour length for a conventional SWO is 30 months (was previously 27) absent exercising he "fleet up" option that tiz84 mentioned where you stay on the same ship for your 2nd tour as well.
But... In addition to all that, for OCS grads they have this thing called OCS SWO Intro, which is in Newport, but is only 3 weeks long and was developed after the disestablishment of the traditional SWOSDOC to help make up for the gap in knowledge between NROTC/USNA grads (who spend 4 years in training programs that, while they produce all flavors of URL officers, are largely SWO-oriented) and OCS grads. That still exists, but...
The SWO community is now establishing a Basic Division Officer Course (BDOC). This course will start in October of this year and will indeed be about 8 weeks. The intent is to get most SWO Ensigns to it prior to reporting to their ship as an intermediate stop (an I-stop) on their orders, but depending on how full classes are, you may actually (and this is the fun part) be ordered to your ship as an I-stop (even though it's the ship you have PCS orders to) then as part of the same orders have an I-stop at BDOC, and THEN you will arrive at your ultimate duty station: the same ship you were just on for up to 5 months as an I-stop. I realize that may seem crazy to you now, but don't worry, that indicates only that you are still sane. But don't worry, we'll take care of that for you: one day, when you've got your SWO pin, it'll all make "perfect sense".
Oh, and by the way, BDOC will be in Norfolk and San Diego, not Newport. Generally speaking, if you are heading to an east coast ship you will go to Norfolk, in to a west coast ship or out to Japan or Hawaii you'll generally go to San Diego for BDOC.
As part of this, you may or may not go to SWOS-ASAT midway through your tour, but that will eventually go away, but it's not going away right away. It may also be the plan to get rid of the OCS SWO Intro course at some point, but I'm not 100% clear on that.
Oh, and to paint as full a picture as possible, for the last 3 or 4 years there's also been a SWO Intro course of about 6 weeks taught in Norfolk and San Diego by the Afloat Training Groups as a sort of an ad hoc gap filler, because it didn't really take us 10 years to realize it was a terrible idea to start sending Ensigns to ships with zero training, it only took us 5 or 6, but it's taken this long to actually do something about it which makes, wait for it… "perfect sense."
And that is a history of SWO intro training over the last 10 years. It's all a rich tapestry... And hopefully explains why you're hearing so many different, at times conflicting reports on what you can expect by way of training.